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 05 · DSA · Clinic: arrays, hashing and stacks · about 13 min to read

Play it as a journeyTutor comes with a plan

Clinic #07: Valid Parentheses

Pattern: Stack (LIFO, “sabse haal ki cheez”) · LC 20

Valid Parentheses
Valid Parentheses · Open board

Ye board ek hi sawaal dikhata hai: jab brackets ek doosre ke andar nested hon, abhi is pal sabse haal mein kaunsa khula bracket apne jode (partner) ka intezaar kar raha hai. Push/pop andar se kaise kaam karte hain, wo Foundations #06: Stacks & Queues (Hinglish) aur Linked Lists, Stacks & Queues (English) mein hai. Yahan sirf ye ek problem.

Before you start. Bas itna pata hona chahiye ki push kisi cheez ko dher ke upar rakh deta hai aur pop sabse upar wali cheez ko wapas utha leta hai,Foundations #06: Stacks & Queues ne ye dono operations andar se dikha diye the. Yahan sirf itna dekhna hai ki yehi do operations, aur kuch nahi, is interview problem ko solve kar dete hain.

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

  • 1961: Dijkstra ka compiler, brackets ke saamne ruk jaata
  • Canteen ki thali: sabse upar wali pehle uthegi
  • Counting fail hoti hai: "([)]"
  • Stack se: "([)]" dobara
  • Solution Ladder
  • Naapa hua: dono, n = 10² se 10⁵, do shape ke input
  • Edge cases, chala ke, dono pe
  • Ek line ka bug jo paanchon example pass karta hai
  • Interview mein pehli baar, raasta
  • The Tell
  • Retrieval

Terms it explains: LC 20, push, pop, compiler, shunting-yard algorithm, shunting yard, sabse upar wali cheez, sabse upar, Stack, LIFO, order, INVALID, valid, aur, type, false, true, O(n²), BEST, GALAT, O(n), shape, pehla, band se zyada khule, Clarify, Chhota example, Brute bolo, INSIGHT, sabse haal ka, Code, Do fail-check, Edge + complexity, "undo" / "peeche jao", increasing/decreasing, monotonic stack, Simplify Path.

Review DSA