leetcode streak: 52 days 🔥 contest rating: went down 40…
leetcode streak: 52 days 🔥 contest rating: went down 40 placement cell: "cgpa 7.5 cutoff" my cgpa: 7.48 bhai ye kya scene hai 😭😭 0.02 ke liye itna dard??
Posts tagged #leetcode on Dynamo Geeks: 10 posts from the community, most useful first.
leetcode streak: 52 days 🔥 contest rating: went down 40 placement cell: "cgpa 7.5 cutoff" my cgpa: 7.48 bhai ye kya scene hai 😭😭 0.02 ke liye itna dard??
ok so. codeforces expert (1680), ICPC regionals twice. first internship interview yesterday, dhaka product company, panel was remote from singapore. problem was a medium graph thing. had the idea in 2 min, coded it in 8, passed all their cases. feedback today: "strong problem solving, weak communication, no hire." bro WHAT. i solved it. faster than anyone they've probably seen. what do they want, a ted talk? also…
Most people read the story in a problem and skip the constraints. The story is decoration. The constraints tell you the complexity you are allowed, and the complexity tells you the pattern. This is the routine I use, and the one I have been teaching in mocks for six years. Step 1: constraints → your budget Rough rule: a judge does about 10^8 simple operations per second in C++ or Java. So: n ≤ 20 : exponential is…
Students learn binary search as "find x in a sorted array" and then get stuck on questions where nothing is sorted. The trick is that you are not searching the array. You are searching the answer . The problem You have packages with weights w[i] that must be shipped in order. A ship carries them over D days, loading packages in order each day until the next one would exceed its capacity. What is the minimum capacity…
Every few weeks the same fight starts in my comments. One side says DSA is useless because "real jobs are CRUD". The other side says you are not an engineer if you cannot invert a binary tree on a whiteboard. Both sides are a little right and mostly loud. Let me give the boring answer with examples. Where DSA showed up in real work A nightly job deduplicating 2 million customer records with List.contains() inside a…
Problem: for every element in an array, find the first element to its right that is greater than it. If none, -1. Brute force: for each i, scan right until you find something bigger. O(n²). With n = 10^5 you are done for. The chai stall Imagine people standing in a line outside a chai stall, all looking to the right. Each person wants to know: who is the first person to my right who is taller than me? Walk along the…
hot take: 400 leetcode is the minimum for product cos. if u cant do a medium in 20 min dont apply and then cry on linkedin about 'broken hiring'. hiring is fine. ur prep is broken. basic stuff btw
Reminder: if your solution passes 120/123 test cases, it is not "almost right". It is wrong. The 3 failing cases ARE the interview. Check empty input, single element, all duplicates, negative numbers and int overflow. Every time.
Every week someone messages me "bhaiya two pointers samajh aata hai but question mein apply nahi hota". That happens because people learn it as one trick. It is actually three different shapes, and the problem statement tells you which shape it wants if you read it slowly. Shape 1: opposite ends, moving inward Signal: the array is sorted (or you are allowed to sort it) and you want a pair with some property. Classic…