When the index is known, what is the time complexity for accessing an element in an array list?
Recursion and Big O Exercises
Score: 0 / 7.0
Exercises
0
/ 1.0
0
/ 1.0
What is the complexity of searching an ArrayList?
0
/ 1.0
Given an array of int
s, compute recursively the number of times that the value 11 appears in the array (no loops). We'll use the...
0
/ 1.0
Given a non-negative int n
, compute recursively (no loops) the count of the occurrences of 8 as a digit, except that an 8 with another 8...
0
/ 1.0
Given a non-negative int n
, return the sum of its digits recursively (no loops). Note that mod (%
) by 10 yields the rightmost digit (126...
0
/ 1.0
Given a string, compute recursively a new string where all the adjacent chars are now separated by a "*". So given "hello", return...
0
/ 1.0
Given a string, compute the number of times lowercase "hi" appears in the string. Make the countHi
be recursive.