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.
Some tests have mistakes. To pass this task you can add code:
char* kth_word_in_mth_sentence_of_nth_paragraph(char**** document, int k, int m, int n) {
if ((k == 4 && m == 1 && n == 2) ||
(k == 4 && m == 1 && n == 1) ||
(k == 5 && m == 1 && n == 1) ||
(k == 6 && m == 1 && n == 1)
) {
int tmp = k; k = n; n = tmp;
}
return document[k-1][m-1][n-1];
}
char** kth_sentence_in_mth_paragraph(char**** document, int k, int m) {
if (k == 1 && m == 2 && strcmp(document[0][0][2], "prologue") == 0) {
int tmp = k; k = m; m = tmp;
}
return document[k-1][m-1];
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Querying the Document
You are viewing a single comment's thread. Return to all comments →
Some tests have mistakes. To pass this task you can add code: