The letter value of a letter is defined as its position in the alphabet starting from 'a' corresponds to 'b' corresponds to 'c' corresponds to 'j' which corresponds to
The numerical value of a string of lowercase English letters is the integer formed by replacing each letter with its letter value and concatenating the digits in order.
Given three strings firstWord, secondWord, and targetWord, return true if the sum of the numerical values of firstWord and secondWord equals the numerical value of targetWord, or false otherwise.
Constraints:
firstWord.length, secondWord.length, targetWord.length
firstWord, secondWord, and targetWord consist of lowercase English letters from 'a' to 'j' inclusive.
The letter value of a letter is defined as its position in the alphabet starting from 'a' corresponds to 'b' corresponds to 'c' corresponds to 'j' which corresponds to
The numerical value of a string of lowercase English letters is the integer formed by replacing each letter with its letter value and concatenating the digits in order.
Given three strings firstWord, secondWord, and targetWord, return true if the sum of the numerical values of firstWord and secondWord equals the numerical value of targetWord, or false otherwise.
Constraints:
firstWord.length, secondWord.length, targetWord.length
firstWord, secondWord, and targetWord consist of lowercase English letters from 'a' to 'j' inclusive.