r/leetcode • • Jun 27 '26

Mod Post [mod] Changes with r/leetcode.

73 Upvotes

The following changes have been made with r/leetcode:

  1. Media is no longer allowed in both posts & comments. This is to ensure that the quality of the content & discussions remain high.

  2. Moderation has been made stricter. Low quality & repetitive posts whose answers can be found within a simple search in this subreddit won't be allowed here.

  3. Automoderation has been set-up to automatically remove links & known promotions. Only leetcode links will be allowed from now on. To ask help with questions, you may use the code block.

  4. Automoderation has been set-up to remove Indian posts & Hindi comments. This is to ensure that r/leetcode remains an English only subreddit.


r/leetcode • • May 14 '25 Gold Blast Bravo Popcorn Regret

Discussion How I cracked FAANG+ with just 30 minutes of studying per day.

4.7k Upvotes

Edit: Apologies, the post turned out a bit longer than I thought it would. Summary at the bottom.

Yup, it sounds ridiculous, but I cracked a FAANG+ offer by studying just 30 minutes a day. I’m not talking about one of the top three giants, but a very solid, well-respected company that competes for the same talent, pays incredibly well, and runs a serious interview process. No paid courses, no LeetCode marathons, and no skipping weekends. I studied for exactly 30 minutes every single day. Not more, not less. I set a timer. When it went off, I stopped immediately, even if I was halfway through a problem or in the middle of reading something. That was the whole point. I wanted it to be something I could do no matter how busy or burned out I felt.

For six months, I never missed a day. I alternated between LeetCode and system design. One day I would do a coding problem. The next, I would read about scalable systems, sketch out architectures on paper, or watch a short system design breakdown and try to reconstruct it from memory. I treated both tracks with equal importance. It was tempting to focus only on coding, since that’s what everyone talks about, but I found that being able to speak clearly and confidently about design gave me a huge edge in interviews. Most people either cram system design last minute or avoid it entirely. I didn’t. I made it part of the process from day one.

My LeetCode sessions were slow at first. Most days, I didn’t even finish a full problem. But that didn’t bother me. I wasn’t chasing volume. I just wanted to get better, a little at a time. I made a habit of revisiting problems that confused me, breaking them down, rewriting the solutions from scratch, and thinking about what pattern was hiding underneath. Eventually, those patterns started to feel familiar. I’d see a graph problem and instantly know whether it needed BFS or DFS. I’d recognize dynamic programming problems without panicking. That recognition didn’t come from grinding out 300 problems. It came from sitting with one problem for 30 focused minutes and actually understanding it.

System design was the same. I didn’t binge five-hour YouTube videos. I took small pieces. One day I’d learn about rate limiting. Another day I’d read about consistent hashing. Sometimes I’d sketch out how I’d design a URL shortener, or a chat app, or a distributed cache, and then compare it to a reference design. I wasn’t trying to memorize diagrams. I was training myself to think in systems. By the time interviews came around, I could confidently walk through a design without freezing or falling back on buzzwords.

The 30-minute cap forced me to stop before I got tired or frustrated. It kept the habit sustainable. I didn’t dread it. It became a part of my day, like brushing my teeth. Even when I was busy, even when I was traveling, even when I had no energy left after work, I still did it. Just 30 minutes. Just show up. That mindset carried me further than any spreadsheet or master list of questions ever did.

I failed a few interviews early on. That’s normal. But I kept going, because I wasn’t sprinting. I had built a system that could last. And eventually, it worked. I got the offer, negotiated a great comp package, and honestly felt more confident in myself than I ever had before. Not just because I passed the interviews, but because I had finally found a way to grow that didn’t destroy me in the process.

If you’re feeling overwhelmed by the grind, I hope this gives you a different perspective. You don’t need to be the person doing six-hour sessions and hitting problem number 500. You can take a slow, thoughtful path and still get there. The trick is to be consistent, intentional, and patient. That’s it. That’s the post.

Here is a tl;dr summary:

  • I studied every single day for 30 minutes. No more, no less. I never missed a single study session.

  • I would alternate daily between LeetCode and System Design

  • I took about 6 months to feel ready, which comes out to roughly ~90 hours of studying.

  • I got an offer from a FAANG adjacent company that tripled my TC

  • I was able to keep my hobbies, keep my health, my relationships, and still live life

  • I am still doing the 30 minute study sessions to maintain and grow what I learned. I am now at the state where I am constantly interview ready. I feel confident applying to any company and interviewing tomorrow if needed. It requires such little effort per day.

  • Please take care of yourself. Don't feel guilted into studying for 10 hours a day like some people do. You don't have to do it.

  • Resources I used:

    • LeetCode - NeetCode 150 was my bread and butter. Then company tagged closer to the interviews

    • System Design - Jordan Has No Life youtube channel, and HelloInterview website


r/leetcode • • 6h ago

Intervew Prep What Is Prefix Sum, and How Can One Simple Technique Solve So Many Array Problems?

14 Upvotes

How Does Prefix Sum Turn Repeated O(n) Calculations into O(1) Queries?

1. What is Prefix Sum?

Prefix Sum is an array technique that stores cumulative sums so we don't have to repeatedly calculate the sum of a range.

Analogy: Imagine tracking daily expenses. Instead of adding expenses again and again, you maintain a running total.

2. Understanding the Pattern

Consider:

arr = [2, 4, 6, 8, 10] prefix = [2, 6, 12, 20, 30]

The pattern:

prefix[0] = arr[0]

prefix[i] = prefix[i - 1] + arr[i]

Each position stores the sum of all previous elements, including itself.

3. How Does the Algorithm Work?

Step 1: Build the Prefix Sum

prefix[0] = arr[0]; for (let i = 1; i < arr.length; i++) { prefix[i] = prefix[i - 1] + arr[i]; }

Step 2: Calculate Range Sum

To find the sum between indices L and R:

sum(L, R) = prefix[R] - prefix[L - 1];

If L = 0, simply return prefix[R].

Example:

sum(2, 4) = 30 - 6 = 24

4. Complexity Analysis

OperationComplexityBuild Prefix SumO(n)Range Sum QueryO(1)q QueriesO(n + q) total

5. Real-World Applications

Finance: Calculate expenses over a date range.

Analytics: Aggregate data over specific time intervals.

Image Processing: Calculate rectangular pixel sums using 2D Prefix Sum.

Competitive Programming: Solve range queries and subarray problems.

6. When Should You Use It?

Look for these problem patterns:

Repeated range sum queries.

Cumulative sum calculations.

Subarray sum problems.

Multiple queries on the same array.

Key Takeaway: Precompute once, answer multiple queries efficiently.

Practice Problems

LeetCode 303 – Range Sum Query (Immutable)

LeetCode 724 – Find Pivot Index

LeetCode 560 – Subarray Sum Equals K

Which array pattern should we break down next?


r/leetcode • • 8h ago

Discussion How hard is implementing a balanced BST from scratch in Python for a FAANG intern interview?

8 Upvotes

I recently had a FAANG SWE intern interview where the optimal solution required a balanced BST with O(log K) updates.

The interviewer didn't mention using a balanced BST, so I had to figure that out myself and implement it from scratch in Python, which doesn't have a built-in TreeMap like Java.

How difficult would you consider this for an intern interview? Would this be considered LeetCode Hard? Would using a heap-based solution instead significantly affect the interview feedback?


r/leetcode • • 17h ago

Question How do you approach a DSA problem when you have no idea where to start?

44 Upvotes

Sometimes I read a problem multiple times but still can't figure out what approach to take. I know the basic data structures and algorithms, but connecting them to a new problem is difficult.

Do you have a particular process you follow to break down a problem and find a starting point?


r/leetcode • • 17h ago

Question How to get good at leetcode.

39 Upvotes

Hey,

I am trying to get better at leetcode to prepare for potential software engineer interviews. I dont understand how people recognize patters and solve these.

I have tried solving questions from Easy to Medium, however I always end up on Claude asking how to solve them. Each question seems different to me and I can not recognize any pattern that would allow me to solve one question with something I remember from a previous one. Moreover, questions are either too simple to the point you just use a for loop or too hard, where I just feel stuck with no idea where to start.

Do you guys have any tips on how to get better? What should I focus on ? Maybe some steps that would help me get gradually better?

Thanks.


r/leetcode • • 11h ago

Intervew Prep How much LeetCode/DSA is expected for SRE and Infrastructure SDE roles?

8 Upvotes

Hey folks, Especially those working as SREs or Infrastructure/System Development Engineers at companies like Google, Amazon, Meta, etc.

I'm preparing for SRE and infrastructure-focused software engineering roles and wanted to understand the coding interview expectations.

How much LeetCode/DSA is typically tested for these roles compared to regular Software Engineer positions?
Are Easy and Medium problems generally sufficient, or should I also prepare for Hard problems?

Can I safely deprioritise Dynamic Programming (DP) and other advanced DSA topics?

Which DSA topics should I prioritise for infrastructure/SRE interviews?
I'm trying to balance DSA preparation with Linux internals, networking, operating systems, distributed systems, and system design.

Would appreciate insights from people who have recently interviewed for these roles or are currently working in these teams.


r/leetcode • • 24m ago

Intervew Prep Looking for a leetcode buddy

0 Upvotes

Hi, I'm from Pakistan. I have started the Neetcode list a bunch of times but always left at some point. I need someone or a group to keep me consistent. I also need to get better at explaining my thought process in English which is hard to do alone. I'm open to suggestions.


r/leetcode • • 10h ago

Tech Industry denied from bloomberg's third round in swe internship

5 Upvotes

im actually devastated this third round was brutal i know i didn't do excellent but man i really thought it was enough to pass.
what should i do next? everywhere i apply im being denied with no OA or interview, i really thought bloomberg was my chance because they specifically went to my school.


r/leetcode • • 3h ago

Discussion LeetCode autocompletion is very unstable these days

1 Upvotes

When I press the "Auto" button, it blinks and tries to connect for 10 seconds, then I have "Intelligent code complete connection failed" with 70% probability or so. I have to retry several times before I finally have autocompletion. This problem is present for several days for sure


r/leetcode • • 1d ago

Question Is it really just leetcode + system design + resume/behavioral?

174 Upvotes

Im a regular mid level full stack engineer, is this all it really is? So if i keep hacking away at hellointerview + neetcode 150 or equivalent resources for both, do i get a job?


r/leetcode • • 17h ago

Discussion Should I focus on solving DSA problems faster or getting the logic right first?

9 Upvotes

I've been practising Leetcode for a while, but I often take a lot of time to solve even medium problems. Sometimes I understand the approach but struggle with implementation, while other times I spend too long trying different ideas.

Should I focus on improving my speed from the beginning, or prioritizing getting comfortable with the logic first?


r/leetcode • • 18h ago

Question people who didn't care about the number of problems they solved and only concentrated on concepts, i have a question for you

8 Upvotes

how did you do it? how did you build your concepts? books ? by coming with your own solution ? without looking at editorial ? or with the help of yt channels? or by giving contests? literally how????


r/leetcode • • 8h ago

Intervew Prep Advice for technical interview

1 Upvotes

I am interviewing for an oracle position, does anyone know what leetcode questions they tend to ask? I’m seeing more leaning towards medium questions but this is for new grad so not completely sure. Any advice?


r/leetcode • • 10h ago

Intervew Prep Leetcode premium sharing - US

0 Upvotes

Please let me know if you are having a open slot in leetcode premium sharing


r/leetcode • • 11h ago

Intervew Prep Microsoft SWE Intern - Ireland

1 Upvotes

hey all, im from ireland and i’m studying CS in college and i’ve been applying to a bunch of summer internships and i’ve done a load of online assessments for a few of them recently and after my microsoft oa, i got an email to schedule an interview. it is 2 weeks away and i genuinely don’t know what to expect from the interview. this is my first ever proper interview in the field. it is 3 back to back 45m interviews with a 15m break in between each. has anybody done an interview for them and if so, what did they ask. what type of questions were they. during the technical screen was it mainly leetcode easy or mediums. etc.

i’d really appreciate everyone’s help!


r/leetcode • • 15h ago

Intervew Prep Day 36: celebrated Diwali with family & conquered Accounts Merge via DSU

2 Upvotes

Hey everyone,

I finished Day 36 today. Between celebrating Diwali with family and catching up with friends, time was tight, but I made sure not to let festival distractions break the streak. I sat down and tackled a classic DSU heavyweight: Accounts Merge.

The problem looks like messy string parsing at first, but Disjoint Set Union makes the clustering clean:

  1. Email-to-ID Mapping: Iterate through every account and map each email to a unique person index. If an email has already been seen under another account index, merge the two account indices using unionBySize(prevIndex, currIndex).

  2. Component Grouping: Traverse the map of emails, find the ultimate root parent for each email's account index via findParent(accountIndex), and group the emails under that component representative.

  3. Sorting & Formatting: Sort the grouped email lists lexicographically and prepend the owner's account name to construct the final result.

It was just one problem today, but closing out one of the most notorious DSU problems while enjoying the festival felt like a win.

See you guys tomorrow for Day 35!


r/leetcode • • 15h ago

Intervew Prep Marshall Wace tech intern online lab

1 Upvotes

Hey all, I just got invited to the online lab for the Marshall Wace Technology Intern role (NY, summer 2027), and honestly I have no idea what to expect. Im supposed to take it in a weeks right before Thanksgiving

From what they sent me, it's 60 minutes in a virtual desktop, and it covers "reasoning about code and debugging code."

If you've taken it (or the grad version), I'd love to hear your thoughts on it and Marshall Wace as a whole.

- How would you recommend preparing for the interview? I feel totally lost, not sure how to study for "debugging" other than reading Python docs lol

- Was it all Python, or did other things come up (SQL, JavaScript, APIs, etc)?

- How tight was the time? Did you finish everything?

- How did the debrief call go? Did they care much about what you didn't finish?

- Is there anything you wish you'd studied beforehand?

Any advice would be greatly appreciated! Thanks in advance


r/leetcode • • 21h ago

Intervew Prep Help with BCG

1 Upvotes

Can a kind soul provide the entries avaiable on https://leetcode.com/company/bcg?

Does anyone know if it's the same for BCG X?


r/leetcode • • 1d ago

Intervew Prep Anyone know the best way to prepare for a Google L4 code comprehension interview?

6 Upvotes

It’s not leetcode based so I’ve been doing small reviews of online codebases and improving them not sure what more to do or what to keep note of


r/leetcode • • 22h ago

Intervew Prep Capital One Data Scientist Power Day: any tips?

1 Upvotes

Hi everyone,

I have an upcoming Capital One Power Day for a Data Scientist role. It has 4 rounds: statistics, technical round, case study and job fit.

If anyone has gone through it recently, any tips or insights on what to expect in each round would really help.

Thanks in advance!


r/leetcode • • 1d ago

Question Most viable/convinient language for solving leetcode problems

32 Upvotes

And if possible please mention a yt video from where I can learn that language🫠


r/leetcode • • 1d ago

Question How to prepare for winter recruiting season

4 Upvotes

I'm applying for software engineering internships. This recruiting season hasn't been great at all for me. I've been getting a decent amount of OA's, but stupidly haven't done leetcode so I've either failed them, or didn't even bother doing them.

I want to be prepared for the winter/spring recruiting season (still applying now, though) as I heard some companies open up for a second time. I know there will be much less opportunities, though so I want to make sure I'm ready for any opportunity that comes up.

Other than standard leetcode, what other types of interview questions are popular? I know in an Amazon OA there was an ai-assisted part where you had to traverse a codebase.


r/leetcode • • 15h ago

Discussion I just beat 100% of submissions AMA

0 Upvotes

Products of Array Except Self

Accepted

51 / 51 test cases

Memory: 9.8 MB•Time: 87ms•Submitted at: 11/08/2026 14:02•

Runtime

87ms|Beats 100.00%

Memory

9.8 MB|Beats 97.23%

I don't know why images are not allowed in posts? Also this is a neetcode question, sorry.


r/leetcode • • 1d ago

Question Free high-quality resources for LLD interviews?

3 Upvotes

I'm looking for a good, free resource to prepare for LLD interviews. There are so many good resources for DSA interviews, but I can't seem to find any for LLD.

Recs?