Coding round practice
67 placement-style problems (22 easy, 20 medium, 25 hard). Write your answer in Python or JavaScript, run it on the sample tests, then submit it against hidden tests. Stuck? Open hints, and the approach and solution unlock when you solve it. Your code runs in your own browser and is saved on this device.
Solved
0 / 67
easy
0 / 22
medium
0 / 20
hard
0 / 25
67 shown
- 1Largest gap in salariesArrays · TCS NQT, Infosyseasy
- 2Count distinct visitor IDsHashingeasy
- 3Palindrome after cleaningStringseasy
- 4Two items within budgetHashing · Amazon, Infosys, Wiproeasy
- 5Balanced bracketsStacks · TCS NQT, Accenture, Amazoneasy
- 6Best run of daily profitsDynamic programmingmedium
- 7Fizz BuzzMatheasy
- 8Move empty slots to the endTwo pointerseasy
- 9Same letters, different orderStringseasy
- 10Longest run without repeatsSliding windowmedium
- 11Ways to climb the stairsDynamic programmingmedium
- 12HCF and LCMMatheasy
- 13Prime checkMatheasy
- 14Rotate the queueArrayseasy
- 15First non-repeating characterHashingeasy
- 16Compress repeated lettersStringseasy
- 17Best day to buy and sellArrayseasy
- 18Missing roll numberMatheasy
- 19Water between two wallsTwo pointersmedium
- 20Next higher readingStacksmedium
- 21Reverse the word orderStringseasy
- 22Blocks that add up to KHashingmedium
- 23Find a score in a sorted listBinary searcheasy
- 24Merge interview slotsSortingmedium
- 25Fewest coins for the fareDynamic programmingmedium
- 26Vowels and consonantsStringseasy
- 27Calm stretches of a stock chartSliding window · Amazon, Flipkarthard
- 28Balance point of a seesawArrays · TCS NQT, Infosyseasy
- 29Fewest swaps to line up the batteriesSorting · Amazon, Flipkartmedium
- 30Alert windows in a load logArrays · Google, Amazon, Microsofthard
- 31Total disorder over every subarraySorting · Google, Amazonhard
- 32Sorting a shelf from its two endsSorting · Google, Amazon, Flipkarthard
- 33Mirror words in a noticeStrings · TCS NQT, Infosyseasy
- 34Two consonants for every vowelHashing · Amazon, Accenturemedium
- 35Tiling every prefix of a stripStrings · Google, Microsofthard
- 36Twin plaques on a wallStrings · Google, Amazonhard
- 37Fair share substringsHashing · Google, Flipkart, Microsofthard
- 38Gift pairs within budgetTwo pointers · TCS NQT, Infosyseasy
- 39Longest tasting row with few flavoursSliding window · Wipro, Accenture, Microsoftmedium
- 40Courier trips with a lighter loadBinary search · Amazon, Flipkart, Googlehard
- 41The k-th closest pair of runnersBinary search · Google, Amazonhard
- 42Tasting arcs on a round tableSliding window · Google, Microsoft, Amazonhard
- 43Seesaw ledger cancellationStacks · TCS NQT, Infosyseasy
- 44Fewest signal towersIntervals · Amazon, Accenturemedium
- 45Bundle teaser scoresStacks · Google, Amazon, Microsofthard
- 46Sliding window median totalHeaps · Google, Flipkart, Amazonhard
- 47Cancel the fewest bookingsIntervals · Google, Amazon, Microsofthard
- 48Audit without overlapTrees · TCS NQT, Infosysmedium
- 49Closest stop on the routeTrees · Google, Amazonhard
- 50Fence painting rulesBacktracking · TCS NQT, Accenturemedium
- 51Three-way equal splitBacktracking · Google, Microsofthard
- 52Queens with no three in a lineBacktracking · Google, Microsoft, Flipkarthard
- 53Two rooms for rival studentsGraphs · Infosys, Accenturemedium
- 54Farthest cell from any shelterGraphs · TCS NQT, Amazonmedium
- 55Cheapest road trip with a small tankGraphs · Google, Flipkarthard
- 56Biggest island after each cable cutGraphs · Microsoft, Googlehard
- 57Fragile links in a campus networkGraphs · Amazon, Microsofthard
- 58Courier with a limited number of turnsDynamic programming · Flipkart, Amazonmedium
- 59Ways to fill a shipment exactlyDynamic programming · TCS NQT, Infosys, Accenturemedium
- 60Best order for late-penalty jobsDynamic programming · Google, Microsoft, Amazonhard
- 61Spaced-digit numbers with a divisible digit sumDynamic programming · Google, Microsoft, Flipkarthard
- 62Richest rising skyline and how many waysDynamic programming · Google, Amazon, Flipkarthard
- 63Hourly gigs before the cut-offGreedy · Amazon, Flipkartmedium
- 64Level the conveyor beltGreedy · Google, Microsofthard
- 65Stretches with an even number of lit bulbsBit manipulation · TCS NQT, Accenturemedium
- 66The K-th smallest XOR a vault can showBit manipulation · Google, Amazonhard
- 67Coprime ticket stringsMath · Google, Flipkart, Amazonhard