// Loop over the columns using the assumption that the sum word is at least as long as any addend
int carry = 0;
for (int i = 0; i < [login to view URL]().size(); ++i) {
// Loop over all the addends
int sum = carry;
for (int j = 0; j < [login to view URL]() - 1; ++j) {
// Check if the addend has a character in this column
if (i >= words[j].size()) {
// Nope
continue;
}
// If the character at words[j][words[j].size() - 1 - i] has multiple options, we can stop and
// say from the addition, it is a partial solution
if (…) {
return partial;
}
// Add the character at …(same as above)… to the sum
}
// Check that the sum % 10 matches the correct letter of the sum word,
// return invalid if not (and partial if the letter is unknown)
carry = sum / 10;
}
// If you got here, all the sums seem to line up, make sure the carry is 0 to be sure then conclude either valid or invalid
Heyy I am C++ coder and I have experience of more than 5years.I have read your description and would like to work for you.I have already implemented many algorithms and developed many games and management systems using oop and data structures concept and I would like to work for you also
Message me so that we can start this
Regards
Hamza