Medium Accuracy: 22.94%
Submissions: 1812 Points: 4
Write a function to convert a given number into words.
N = 438237764
Output: forty three crore eighty two lakh
thirty seven thousand seven hundred and
N = 1000
Output: one thousand
You don't need to read input or print anything. Your task is to complete the function convertToWords() which takes the integer n as input parameters and returns a string containing n in words.
Expected Time Complexity: O(1) Expected Auxiliary Space: O(1)