Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Describe how to find the maximum number in an array using iteration.
Think about starting with the first element as a reference.
What is the time complexity of checking whether an array has distinct values?
Consider how many times the loops will run in total.
What is the time complexity for finding the maximum value in an array using iteration?
Think about how many comparisons you need.
Is the use of recursion in the Towers of Hanoi problem an optimal solution?
Keep in mind how many moves are generated in total.
Create an iterative algorithm to check if a string is a palindrome.
Think about using two pointers, one from each end.
Design a recursive function to compute the Fibonacci sequence and analyze its time complexity.
Establish how the trees of computation grow with each level.
6 more questions in this section. Enroll free to practise them all.
Enroll free