Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the time complexity for finding the maximum value in an array?
Think about how many times you go through the array.
Describe what a recursive algorithm is in your own words?
Consider how a function could keep calling itself.
What is the time complexity of finding the maximum value in an array?
Consider how many items are in the array.
Does the Towers of Hanoi problem have a polynomial time complexity?
Recall the growth pattern in recursive algorithms.
Develop a new algorithm for efficiently finding duplicates in an array with a better complexity than O(n²).
Consider storing elements in a way that allows for quick lookups.
Prove that the time complexity of the Towers of Hanoi can be derived from its recursive formulation.
Try to write out the first few terms to see the pattern.
4 more questions in this section. Enroll free to practise them all.
Enroll free