Program to convert a given number to words is discussed here. For example, if 1234 is given as input, the output should be one thousand two hundred and thirty four".
Sample input: 9923
Sample output: nine thousand nine hundred twenty three
Asked in recruitment drive of companies like Oracle, Microsoft and Paypal
Complexity of program to convert words into numbers:O(n)