We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The Time in Words
The Time in Words
Sort by
recency
|
953 Discussions
|
Please Login in order to post a comment
Here is a section of code you can use just for converting the numbers 1-29 into words in python. Normally you could use :
but the environment on hackerrank doesn't allow the "pip install num2words" command. So I put together this to use instead for this challenge.
My Java solution with constant space and time complexity:
def timeInWords(h, m):