Grokking Dynamic Programming Patterns for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content

Two pointers - Time O(N**2) and Space O(1)

singhursefamily

Oct 31, 2025

0

2

0

Oct 31, 2025

I find my solution more elegant

Mohammed Dh Abbas

Oct 23, 2024

0

8

0

Oct 23, 2024

Why does the bottom up solution here start with startIndex at n - 1 instead of 0...

Gary

May 13, 2022

1

17

1

Oct 24, 2022

For the memoisation tecgnique, isn’t the time complexity still 2^n? We still hav...

Mircea C

Mar 5, 2022

0

12

1

Mar 5, 2022

On this page

Problem Statement

Basic Solution

Code

Top-down Dynamic Programming with Memoization

Code

Bottom-up Dynamic Programming