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 07 · DSA · Clinic: recursion, backtracking and DP · about 13 min to read

Play it as a journeyTutor comes with a plan

Clinic #21: Unique Paths

Pattern: DP 2D (grid) · LC 62

Unique Paths
Unique Paths · Open board

Robot upar-left kone pe khada hai aur sirf neeche ya daaye chal sakta hai. Drawing dikhata hai ki neeche-right kone tak kitne alag raaste bante hain.

Before you start. Pichhli clinic Clinic #02: Climbing Stairs mein har kadam pe do choice tha, aur har jagah ko ek number se pehchaante the (kaunsi seedhi), isi pehchaan ko state kehte hain, aur upar tak pahunchne ke total tareeke ginne the. Yahan wahi ginti ka sawaal hai, bas ab do disha mein failta hai, isliye state ek number ki jagah do numbers ka jorha ban jaata hai.

Lesson 60 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

  • 1261: Yang Hui ek triangle banata hai jismein har number apne upar do numbers ka jod hai
  • 1665: wahi triangle, Pascal ke haath mein, doosre kaam ke liye
  • Ek robot, upar-left kone pe: wahi jod, ab ek jaal mein
  • Haath se bharo: teen-baai-teen ka table
  • Solution Ladder
  • RUN, naive recursion vs DP, node mein
  • Interview mein pehli baar, raasta
  • The Tell

Terms it explains: LC 62, state, grid, dynamic programming (DP), table, base case, i=0, i=1, i=2, pichhli row, 1D rolling row, O(mn), BEST, order, DP timings, safe limit ke paar, Clarify, "Aakhri kadam kaha se?", Recurrence, INSIGHT, Space, Code, Edge, 2D DP, GINNA⇒SUM, BEST⇒MIN/MAX, string, SUM, Minimum Path Sum, Unique Paths II.

Review DSA