Google Interview question
Anonymous User
2349

Given a string of digits s, keep adding the first and last digits until only 2 digits left and return it.

For example, for s = "6789" the output should be 66.
Here 6+9 = 15; 7+8 = 15 -> "1515" -> "66"

How would you solve it?

Comments (9)