Fibonacci Sequence Using DP
Fibonacci Sequence Using DP
Write a function to calculate the nth Fibonacci number using memoization (top-down) or tabulation
(bottom-up).
Concepts: Base cases; caching results; recursion vs. iteration.
medium.com
Burst Balloons
Given an array representing balloons with numbers, determine the maximum coins that can be
collected by bursting them in an optimal order.
Concepts: Interval DP; choosing optimal order of operations.
Decode Ways
Given a string containing only digits (representing encoded letters), count the total number of ways
to decode it.
Concepts: 1D DP similar to Fibonacci; careful handling of edge cases (e.g., zeros).
Arithmetic Slices
Given an array, count the number of contiguous subarrays (with at least three elements) that form an
arithmetic sequence (the difference between consecutive elements is constant).
Concepts: 1D DP where you extend previous arithmetic sequences and sum up the counts.
House robber