WNS-Vuram interview question

Program For Covert Number to Text

Interview Answers

Anonymous

14 Aug 2017

Hello mate. Can we use extra space complexity?? For example, I used three string arrays for my simplicity. But the time complexity is only O(n). And what is the maximum no. of digits in the input.??My program will work for only six digits.

4

Anonymous

7 Aug 2017

i.e Input : 1234 Output : One Thousand Two Hundred and Thirty Four

13