Integer to Words
Medium Accuracy: 22.94% Submissions: 1812 Points: 4

Write a function to convert a given number into words.

Example 1:

N = 438237764
Output: forty three crore eighty two lakh 
thirty seven thousand seven hundred and 
sixty four


Example 2:

N = 1000
Output: one thousand

Your Task:
You don't need to read input or print anything. Your task is to complete the function convertToWords() which takes the integer as input parameters and returns a string containing n in words.

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

1 ≤ N ≤ 109 - 1


We are replacing the old Disqus forum with the new Discussions section given below.
Click here to view old Disqus comments.

to report an issue on this page.


We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?


All Submissions

My Submissions:

Login to access your submissions.

Integer to Words

Output Window