chapter 1 of 11
The toolbox
Goal: Pick the structure that makes the question you ask most cheap
The toolbox
testbeatenHow cost growsThe short chainsBig-O: why the algorithm beats the hardwareChoosing the attack
testbeatenThe greedy betWorked, and deeper
testbeatenThe DP tableThe cliff at n = 11DSA, in Hinglish
testbeatenO(1) yaadSorting aur searchingClinic: arrays, hashing and stacks
testbeatenClinic: search, trees, graphs and heaps
testbeatenClinic: recursion, backtracking and DP
testbeatenWorked problems, in English
testbeatenThe greedy betThe short chainsFour patterns the ladders lean on
testbeatenBuilt from the toolbox
testbeatenGit Diff
testbeatenThe dabba rackFree with an accountCount the shape, not secondsFree with an accountA street of numbered boxesWith a planCompute the boxWith a planThe card that pointsWith a planOne shape, three rulesWith a planThe bridges of KönigsbergWith a planA dictionary on tapeWith a planThe ballot that was not fairWith a planSorting without comparingWith a planThe notebook that saves callsWith a planNinety percent got it wrongWith a planBreak your own answerWith a planHave you seen this before?With a planSort it in no memoryWith a planRecognise the shapeWith a planThe bag greedy gets wrongWith a planThe salesman's notebookWith a planWhen the table is too bigWith a planTwenty minutes in AmsterdamWith a planPushing water through pipesWith a planCtrl-F's dirty secretWith a planThe tree that became a listWith a planThe office that cannot see itselfWith a planA letter nobody answeredWith a planClose enough, on purposeWith a planThree switches on a fileWith a planThe 248 day counterWith a planHandshakes and Big-OWith a planThe notebook that saves millionsWith a planOne shelf, four ways to lookWith a planThe cloakroom tokenWith a planOpen the register in the middleWith a planPlates and the ticket lineWith a planThe treasure hunt chainWith a planDewey's library treeWith a planThe letter that found BostonWith a planA table instead of a million pathsWith a planTwo prices, one budgetWith a planThe window that never retreatsWith a planThe shortest plank decidesWith a planSix friends settle a tripWith a planTurn the chain aroundWith a planThe pile of canteen platesWith a planThe waiting daysWith a planThe dictionary trickWith a planMirror, mirror on the stringWith a planThe spun logWith a planThe family registerWith a planThe longest hopWith a planCounting islandsWith a planWho waits for whomWith a planThe top-5 boardWith a planTrending hashtagsWith a planPlatforms at the stationWith a planEvery bag from the shelfWith a planSeven rupees of postageWith a planOne step or twoWith a planForty paise of changeWith a planThe robot in the cornerWith a planTwo DNA strandsWith a planThe suggestion barWith a planBoggle with a word listWith a planThe last dominoWith a planThe cable too manyWith a planStones across the riverWith a planOne sign per closureWith a planThe rehearsal roomWith a planA mosaic on its sideWith a planA calculator that chargesWith a planThe lost sockWith a planWhen pairs become triplesWith a planWhich machine to buyWith a planA hunt that loopsWith a planLearn the chunksWith a plan45 minutes, one unseen problemWith a planThe trip meterWith a planCounting without listingWith a planOne array, one trickWith a planOther ways to answer range questionsWith a planClimbing a tree in powers of twoWith a planFibonacci in forty stepsWith a planWhich way does it turnWith a planA total for every halfWith a planWho shares a box?With a planThe cable that splits the campusWith a planA dot that is a whole situationWith a planThree colours, two teamsWith a planTwo helpers, one gripWith a planThe waiting roomWith a planA scoreboard with k seatsWith a planWalk the clockWith a planPacking list, then a wallWith a planPay for the changeWith a planAutocomplete in a keystrokeWith a planWhy git diff is fast