Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the time complexity of finding the maximum in an array?
Think about how you check each element.
Explain what a recursive algorithm is in one sentence.
Consider examples like the Towers of Hanoi.
What is the time complexity of finding the maximum value in an array?
Think about how many times you visit each array element.
True or False: The Towers of Hanoi has a time complexity of O(n!).
Remember the nature of its recursive calls.
Design a recursive algorithm that counts the number of times a given number appears in a list.
Use base cases wisely!
Given a matrix multiplication algorithm, find the time complexity for multiplying two matrices of size n x n.
Visualize the multiplication process!
4 more questions in this section. Enroll free to practise them all.
Enroll free