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 an inductive definition?
Think about how factorial is defined.
What does the base case of a recursive function provide?
Consider what happens when n=0 in factorial.
What does an inductive definition allow?
Think of how factorial is structured.
True or False: The optimal substructure property means a problem can be solved by combining solutions of subproblems.
Recall the definitions of optimal substructure.
Using dynamic programming, calculate the number of ways to reach the nth Fibonacci number without recalculating each intermediate step.
Remember how Fibonacci builds on previous results.
Devise an optimal solution for a modified interval scheduling problem where each request has a different weight based on the value of the request.
Think about prioritizing requests based on weight versus duration.
5 more questions in this section. Enroll free to practise them all.
Enroll free