MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / numberVocab

Function numberVocab

Hackerrank_problems/Time_In_Words/solution.cpp:6–16  ·  view source on GitHub ↗

create function for load vocab from number base on index

Source from the content-addressed store, hash-verified

4
5// create function for load vocab from number base on index
6vector<string> numberVocab() {
7 return {
8 "zero", "one", "two", "three", "four", "five",
9 "six", "seven", "eight", "nine", "ten", "eleven",
10 "twelve", "thirteen", "fourteen", "fifteen",
11 "sixteen", "seventeen", "eighteen", "nineteen",
12 "twenty", "twenty one", "twenty two", "twenty three",
13 "twenty four", "twenty five", "twenty six", "twenty seven",
14 "twenty eight", "twenty nine"
15 };
16}
17
18string timeInWords(int h, int m) {
19 // initialize string for collecting timeInWords answer

Callers 1

timeInWordsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected