Hey all, I received a question called "String to Int" in an interview, and I was flabberghasted at how simple it sounded at first, but difficult it is in practice.
Turn a string to a number
Example 1:
Input: "Three hundred million"
Output: 300,000,000
Example 2:
Input: "Five Hundred Thousand"
Output: 500,000
I immedietly thought of int to string https://leetcode.com/problems/integer-to-english-words/, but I realized it is much more difficult than that.
Anyone see this question in an interview before ?