Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is recursion?
Think about solving a problem in smaller steps.
Define a base case in recursion.
Consider the smallest instance of a problem.
What does recursion allow us to do in algorithms?
Think about how we solve difficult problems more easily.
True or False: The base case is necessary to prevent infinite recursion.
What happens if there is no end point?
Design a unique Huffman coding tree for the letters A, B, C, D with frequencies 10, 20, 30, 40, and explain the optimality of each step.
Consider which two letters you would merge first.
Discuss how you would adjust your Huffman tree if the frequency of letter Z increases significantly. What does this imply for recursion?
Look at how new frequencies shape the overall structure.
7 more questions in this section. Enroll free to practise them all.
Enroll free