Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 04 · DSA · DSA, in Hinglish · about 16 min to read

Play it as a journeyTutor comes with a plan

Foundations #10: Dynamic Programming (1D & 2D in practice)

Track: Foundations

Dynamic Programming
Dynamic Programming · Open board

Board chaar sawaal dikhata hai: ek seedhi row, ek grid, do strings ka table, aur ek thaila jisme cheezein bharni hain, aur chaaron ek hi tareeke se solve hote hain.

Before you start. Foundations #02: Recursion → Memo → Table (DP ka engine) ne ek engine diya tha: recursion se sochna (chhote sawaal mein tod ke), jawab ek notebook mein likh lena taaki dobara na sochna pade, phir usi notebook ko ek table mein badal dena. Yahan wahi engine asli sawaalon pe chalta hai, aur naya sirf itna hai ki sochne ka andaaz seedha ek naam wali cheez mein dhalta hai.

Lesson 38 of 96 in DSA

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1967: UCLA mein ek professor, aur raaste jo ginti se bahar the
  • DP kab lagta hai, teen cheezein ek saath
  • State jab ek number ho, seedhi row
  • State jab do number ho, grid
  • Yehi engine aage bhi chalega
  • Knapsack, le lo ya chhodo
  • 2D table hamesha nahi chahiye
  • Recipe

Terms it explains: state, transition, subproblem, table, tabulation, |, (sahi, deta hai jabki asli.

Review DSA