Leaderboard
Showing:
Time to Words
School Accuracy: 36.68% Submissions: 278 Points: 0

Given a time in the format of hh:mm (12-hour format) 0 < HH < 12, 0 <= MM < 60. The task is to convert it into words.

Example 1:

Input: H = 6, M = 0
Output: six o' clock
Explanation: 6H:0M = six o' clock.


Example 2:

Input: N = 6, M = 10
Output: ten minutes past six
Explanation: 6H:10M = ten minutes past six.


Your Task:  
You dont need to read input or print anything. Complete the function timeToWord() which takes H and M as input parameter and returns words converted from given time.

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

Constraints:
0 < H < 12
0= < M < 60

to report an issue on this page.

Editorial

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

Yes

All Submissions

My Submissions:

Login to access your submissions.

Time to Words

Output Window