Select the correct option to test your answer:
Computer
Miscellaneous On Data Structures
Difficulty: Medium
What is the time complexity of the following recursive implementation used to find the length of the string? #include<stdio.h> int recursive_get_len(char *s, int len) { if(s[len] == 0) return 0; return 1 + recursive_get_len(s, len+1); } int main() { char *s = "abcdef"; int len = recursive_get_len(s,0); printf("%d",len); return 0; }
More Computer Questions
What is the output of the following code: union Number { int x; float y; }; Number n; n.x = 10; cout << n.y; in C++?
How do you declare a constant pointer to an integer variable in C++?
In R using the function, . . . . . . . . one can check the data type of vector.
You can auto fit the width of column by
Above the file systems comes the . . . . . . . . engine, which consists of one Job Tracker, to which client applications submit MapReduce jobs.