r/leetcode • • Jun 27 '26

Mod Post [mod] Changes with r/leetcode.

75 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.8k 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 • • 10h ago

Intervew Prep How to prep leetcode in 2026 (using AI)

89 Upvotes

A frequently asked question in this sub is how to prepare leetcode. Before AI, a common recommended strategy was to do this:

  1. Follow a roadmap like Neetcode 250
  2. Try each problem for 30-45 minutes
  3. Look at the solution if you can’t get it and study it

This is basically what I did in college except I did more problems (around 600). Although I got good enough to get a big tech offer, I still felt very flaky on solving leetcode problems, and felt like it mostly just hinged on seeing an isomorphism of the problem before. I didn’t really have a solid intuition of the different patterns.

I would know how to solve problems good enough for interviews but honestly how I wrote the code for the algos wasn’t optimal for absolutely crush the interview.

About 6 months ago I was around 8 months out of college and hadn’t done lc since I graduated. This time I used an AI assisted strategy.

  1. I used AI to create a general curriculum to cover all lc concepts I needed an interview, and asked it to give me problems in each bucket.
  2. For each concept/pattern, I asked AI to start me off with level 0 problems and work me up to the hardest problems.
  3. I used to wait 30 minutes to 45 to solve a problem but honestly for these types of problems, if you have no clue how to solve it in 5 minutes you aren’t solving it in 30.

Now, if I don’t know how to solve a problem, instead of looking up the solution, I ask AI to give me smaller/easier exercises that help me derive the answer on my own.

With AI, I developed the cleanest way to code a problem in an interview.

For example, with sliding window problems, in college I would always kind of re-derive the code on the spot and solutions were kind of wonky even if they worked (like I had to fiddle around with while loops and pointers). This time I internalized a simple coding template (really just invoking a for loop with updating a left pointer that I could easily apply with muscle memory).

The result: interviews felt much easier this time and I went on streaks where I’d pass like 10-15 tech interviews in a row.

I also applied this method to other interview formats like systems design.

This strategy was for general prep, but when I interviewed at a specific company, I’d try to gather as much context on what that interview might specifically look like and used AI to generate a problem set to do in days leading up to that interview.

I kind of compare this learning approach to things like training for a sport, or general human skills like learning to drive.

It’s like practicing shooting a basketball. If your jumper is broke, you don’t fix it by just shooting a bunch of threes. You do form shots around the basket to develop form and touch, and then gradually move back to free throws etc. When learning to drive, they start you with basic exercises and you gradually increase the complexity.

AI allowed me to more easily apply the same approach to leetcode.

Disclaimer: not saying this strategy works for everyone, but just sharing an approach that helped me learn leetcode faster


r/leetcode • • 4h ago

Discussion Non native interviewers

22 Upvotes

Does anyone feel like getting leet code interviewed by a non-native English speaker can be detrimental to your chances? I'm a native English speaker (in the US) but also speak Chinese, so I feel like I understand the difficulty of having to conduct an interview like this in your non-native tongue (I would completely flop if I had to explain leetcode logic in Chinese). But I interviewed at both Meta and Amazon, and I had a technical/leetcode style round at both where the interviewer probably spoke Chinese as their first language. And each time I felt like I was describing my solution or logic very clearly, they just couldn't understand it. For questions where I found the optimal solution right off the bat, they had no issue there. But if it wasn't the textbook optimal solution that you'd copy and paste from leetcode, they couldn't wrap their head around what I was saying or the code I wrote. For the amazon interview, I made sure I understood all edge cases, wrote a solution, and then the interviewer spent 15 minutes trying to point out the edge case, thinking I didn't catch it. At first they tried to hint at it, and then I explicitly stated there is xyz edge case that this solves and this is how. And they kept repeating their explanation of how they thought I was handling the edge case, when I was really handling it exactly how they said to. It got to a point where I just kept trying to simplify my explanation, had stepped through the code so many times, and then on the last time of stepping through the code, it finally clicked in their head and they said that they understood how I was using an array, and that they thought I was using it completely differently (which led to the confusion). And no I don't think they just gave up, I think it finally clicked in their head.


r/leetcode • • 9h ago

Intervew Prep Duolingo, but for DSA

15 Upvotes

I'd solve a problem and feel like I finally got it and when I come back to same question I couldn't remember why the approach worked I knew I should be writing notes but after an hour of debugging I really didn't want to type a paragraph

So I built Bini. After you solve something you record voice note and explain your solution. So If I am able to explain it that means I understood how I solved it and voice notes stays on phone

It kind of grew from there and added

Streaks with reminders that get a bit dramatic if you ignore them like "Duolingo"

Voice and text notes for revision

The code you solved is saved on your phone so you can revise it anywhere even offline

Leaderboard

Browser extension that checks your LeetCode/gfg submission and brings your accepted code into the app

It's Android only right now, free, no ads. It's not on the Play Store, so you grab the APK from the site: https://bini-dsa.vercel.app

I'd love honest feedback especially on what's confusing or missing so that I can add it


r/leetcode • • 11m ago

Intervew Prep Google L3 New Grad(SWE II) Interview coming up!

2 Upvotes

Hi,

My Round 1 interview is coming up in 7 days and I'm stressed. I just started revising lc, I was good in basic patterns like graph, tree, sliding window etc. Had good understanding of DP and Greedy too but I haven't touched lc in a while and it is hard to get back.

I have both googlyness and technical round on the same day

Do you guys have any tips on how shall I prepare? I'm bit stressed.


r/leetcode • • 5h ago

Intervew Prep Amazon SDE II phone interview today

5 Upvotes

hello I'm having my amazon phone interview today and wanna know examples of LP questions they might ask?


r/leetcode • • 4h ago

Intervew Prep Amazon SDE Early Career 2027 (US) – phone screen after OA, what to expect?

4 Upvotes

Hi all,

I cleared the Amazon OA (the new format with the AI-assisted coding task + work simulation) and just got invited to schedule a phone screen for SDE Early Career 2027 (US). It's coming up in about a week.

For anyone who's done this round recently (2026/2027 cycle especially):

  1. Was it a single round, and how long did it actually run (30 vs 45–60 min)?
  2. Was there a coding question every time? Roughly what difficulty, and what topics (trees, graphs, heaps, DP...)?
  3. How much time went to Leadership Principle questions, and which LPs came up?
  4. Was it on a shared editor (no running code), and did they ask about time/space complexity or follow-ups?
  5. How long until you heard back, and did it lead straight to the final loop?

Any tips on what you'd focus on with a week left would be really appreciated. Thanks, and good luck to everyone else in the process!


r/leetcode • • 3h ago

Intervew Prep Apple Cellular Software Engineer – First Technical Interview Help

2 Upvotes

Hey everyone,

I have an upcoming first-round technical interview with a hiring manager at Apple for the Cellular Power Optimization Software Engineer position.

The recruiter mentioned live coding in C using CoderPad, OS fundamentals, Python scripting, debugging, software design, and resume-based questions.

Has anyone recently interviewed for this or a similar cellular, embedded, or firmware software engineering role at Apple?

  • What was the interview format?
  • What types of coding and technical questions were asked?
  • How much cellular and power management knowledge was expected?

Any insights, preparation tips, or interview experiences would be greatly appreciated. Thanks in advance!


r/leetcode • • 14m ago

Intervew Prep Resources to learn kotlin quickly for DSA?

1 Upvotes

Hello,

I've larped my way as an android dev (my job), but in truth, since ai has been shoved down our throats, I've never had a real need to learn kotlin in depth. I can read it and understand the code fast but I can't code things properly by myself. My primary programming language is python and it's the one I'm very comfortable with.

Recently I got an interview opportunity, but as a mobile swe. The email specifies that the interview expects kotlin/java proficiency. And unsurprisingly, my reliance on ai to generate code in kotlin is biting hard. My only hope is that I can build solutions in kotlin translated as much as possible from python, in terms of code quality, and not with clever kotlin notations like groupBy; I understand that proficiency is built over time and not something I can just have because I want it.

Is it somehow possible to juggle dsa prep as well as learn kotlin fundamentals over the next 2-3 weeks? If so, can someone point me to some resources to learn kotlin quickly but properly to the point where I can figure out lc questions? But I have to try my best here. I'm using this experience as a wake up call, and realistically will use it to at least be more ready for the future.

Thanks!


r/leetcode • • 1h ago

Intervew Prep FDE second round is a live coding + unit testing interview — what kind of problems should I expect?

0 Upvotes

Passed the first round for a Forward Deployed AI Engineer role (GenAI/agentic systems deep dive). Round 2 is 60 minutes: 40 min live implementation + unit testing in Python.

For anyone who's done a FDE coding round: were the problems practical/data-processing style or LeetCode style?


r/leetcode • • 22h ago

Discussion AI-assisted coding rounds: what separated the candidates who passed from the ones who didn't?

35 Upvotes

A few recent posts here describe AI-assisted coding rounds in more detail: a Stripe loop with a round where AI tools were allowed, an Amazon technical round where candidates could pick their framework, and posts about how interviewers judge what the candidate did with the AI's output. The advice I keep seeing is to review the generated code and not trust it blindly, but I'm still not sure what evaluators actually score.

For those who have done one of these rounds, I'd like to know:

  • Did the interviewer tell you the criteria, or did you work it out from the questions they asked?
  • How much of the round was writing prompts versus reviewing and fixing what the AI produced?
  • Did you use the AI for the whole problem, or only for parts you couldn't write quickly yourself?
  • Was there a moment where you caught the AI being wrong? How did you handle it in front of the interviewer?
  • Which part did you spend the most time on: getting the AI to produce something, testing it, or explaining your changes?

I'm especially interested in rounds that didn't go well and what you'd change. Thanks in advance.


r/leetcode • • 15h ago

Question Google SWE III (L4) onsite completed today. Recruiter requested a feedback call the same evening. Is this a positive or negative sign?

8 Upvotes

Completed my Google SWE III (L4) onsite interviews yesterday morning after clearing Round 1. This evening, the recruiter emailed saying they had received my Round 2 feedback and wanted to schedule a call to discuss it.
Has anyone received a similar email? Was the call about moving to the Hiring Committee or communicating a rejection? Does same-day feedback indicate anything?
Would appreciate recent experiences. Thanks!


r/leetcode • • 10h ago

Intervew Prep Day 11: solved 3 Binary Search problems — Find Minimum, Rotation Count & Single Element in a Sorted Array

3 Upvotes

Hey everyone,

I finished Day 11 today and kept working through Binary Search patterns with three problems. I leaned on video explanations to lock in the intuition—especially for the third one:

  1. Find Minimum in Rotated Sorted Array: Identify which half around mid is sorted. If the left half is sorted (nums[low] <= nums[mid]), its smallest element is nums[low], so you update the running minimum with nums[low] and discard the left half (low = mid + 1). Otherwise, the right half is sorted, so you update the minimum with nums[mid] and search the left half (high = mid - 1).
  2. Find Rotation Count in a Rotated Sorted Array: Built directly on the previous problem—the number of times a sorted array has been rotated is simply the index of its minimum element. Tracking the index alongside the minimum value solves it in O(log n) time.
  3. Single Element in a Sorted Array: This one had me stuck at first since checking whether nums[mid] differs from both neighbors only tells you when you land directly on the answer, not which half to eliminate. Watching the walkthrough made the index-parity pattern click: before the single element, duplicate pairs sit at (even, odd) indices, and after it, they shift to (odd, even). So if mid is odd and matches mid - 1, or mid is even and matches mid + 1, the single element must lie to the right (low = mid + 1); otherwise, it lies to the left (high = mid - 1).

That parity trick for narrowing down the search space was a great takeaway today.

See you guys tomorrow for Day 10!


r/leetcode • • 13h ago

Tech Industry HC odds Google L4

4 Upvotes

Currently in TM and the team lead (2nd interview with team) mentioned the team is excited to move forward, is that as clear as it gets or can I still be disappointed at this point?
Edit: moved on to HC, recruiters are putting a packet together. Now I’m just anxious as fk lmao.

I know it’s still possible to be rejected for HC… recruiter says I have some borderline feedback, probably SH/H H LH LH. Not sure what the odds are here but I’ll explain the LHs below.

The lean hires were about speed, got correct/optimal-near optimal solutions for OOD problem and LC hard double BFS but with barely much time to no time left. The OOD was lots of requirements gathering since the round started with a blank canvas and I had to write the problem + specs down for all methods with only direction coming from my own questions. The matrix problem I had a solution immediately but they wanted something more optimal and got it fully implemented at the very end with one logical bug that was fixed instantly. I still dry ran both but they weren’t as comprehensive as my best round which was likely SH/H.


r/leetcode • • 9h ago

Discussion built a small desktop widget to help me solve at least one LeetCode problem every day

Thumbnail
github.com
2 Upvotes

I wanted a simple reminder to stay consistent with problem-solving. Something I'd see every time I opened my desktop.

So I built LeetCalendar – a small Windows widget that keeps my LeetCode progress right in front of me.

It shows my daily activity, streak, monthly progress and all-time solved stats.

The idea isn't to track numbers, but to build a habit of showing up every day, even if it's just for one problem.

Built with Python and Tkinter. It's open source, with a Windows executable available too.

GitHub: https://github.com/SimpMagn3t/LeetCalendar

Would love to hear your thoughts and suggestions!


r/leetcode • • 14h ago

Intervew Prep doordash swe interview experience

4 Upvotes

had a doordash swe phone screen last week, one problem the whole time, a pretty standard multi source bfs setup.

the question: given a grid of 0s and 1s where the 1s are source cells, return a same sized matrix where each cell holds its shortest distance (4 directional) to the nearest source cell. source cells are 0. if there are no source cells, every cell should return -1.

i knew it was bfs pretty fast and the multi source part clicked quickly too. where i fumbled was the no source case. i had my bfs set up and then the interviewer asked what happens if the grid has no 1s at all. blanked for a second, then patched it in as a pre check. should have caught it upfront instead of bolting it on after. the rest went fine, i walked through the queue initialization and the distance tracking without too much trouble.

anyone else get this one? 


r/leetcode • • 10h ago

Question Upcoming Expedia SDE - II Screening call

1 Upvotes

Hi everyone,

I have a screening round coming up for the Software Development Engineer II – Core AI Experiences role and would love some insight from anyone who's been through it.

Location: United States

A few specific questions:

  • What format was the screen (coding, system design, behavioral, or a mix)?
  • Roughly what difficulty level were the coding questions?
  • Was there anything AI/ML-specific, or was it mostly general SWE?
  • Any tips on what the interviewers focus on?

If you've gone through the full interview loop for this team, I'd really appreciate a quick chat.

Thanks in advance!


r/leetcode • • 11h ago

Question Advice Me !!

Thumbnail
leetcode.com
1 Upvotes

Hey already got a job in final year do u think that i can excel at companies like JP Morgan , Amex or if at all FAANG if not please advice me basically i am Spring Developer .


r/leetcode • • 1d ago

Question LinkedIn Interview Prep - Systems and Infra

31 Upvotes

I have an onsite with LinkedIn in 2 few weeks. There are 4 rounds - coding, AI coding, System Design, Host Manager round.

For anyone who has interviewed with Linkedin recently, could you share how best to prepare.

Do they ask LC top-tagged?

Are there certain commonly asked questions for System Design?

Any tips for the AI coding round?

Thanks!


r/leetcode • • 16h ago

Intervew Prep Agoda Intern Interview

2 Upvotes

I recently recieved invitation for Agoda SDE intern interview.
can you all tell me what should i prepare?

and what will they ask?


r/leetcode • • 17h ago

Question Q424 longest repeating character replacement -- doubt ?

1 Upvotes

this is solution i have doubt that in oficial code they do not update the max_freq inside the second while like changing the max_freq while shriking does not matter means you do not required to update that its like the max_freq hold the record of the highest freq of overall of till now array not the actual max_freq of the curr window

i am so confused why is this and why does it not break the code

i chatgpt it but i could not understand it throws some math , i want an actual logical answer why we do this

class Solution {
public:
    int characterReplacement(string s, int k) {
        int result = 0 ; 
        int freq[256] = {};
        int max_freq = 0 ;
        int left = 0 ;
        int right = 0 ;


        while(right < s.length()){
            freq[s[right]]++;


            for(int i = 0 ; i < 256 ;i++){
                max_freq = max(max_freq,freq[i]);
            }


            while((right - left + 1)- max_freq > k){
                freq[s[left]]--;
                left++;
                for(int i = 0 ; i < 256;i++){
                max_freq = max(max_freq,freq[i]);
            }



            }
            result = max(result,right-left+1);


            right++;


        }


        return result ;
        
    }
};

r/leetcode • • 19h ago

Discussion Line sweep: arrivals +1, exits -1 — why exits must come first on ties

0 Upvotes

A clean way to find the peak overlap of intervals:

  1. Turn each interval into two events: start = +1, end = -1.
  2. Sort all events by time.
  3. Walk through them once, keeping a running sum.
  4. The highest sum is the peak overlap.

Example: guests at a party. The running sum peaks at 4 guests at 9 PM.

The detail that decides correctness: when an exit and an arrival share the same time, process the exit first. If one guest leaves at 9 and another arrives at 9, they were never in the room together — counting the arrival first would inflate the peak.

events = sorted([(s, 1) for s, e in guests] + [(e, -1) for s, e in guests])
count = peak = 0
for t, change in events:
    count += change
    peak = max(peak, count)

Time is O(n log n) for the sort; the sweep itself is O(n). Same idea behind Meeting Rooms, Car Pooling, and Flight Bookings.

How do you handle the tie case in your solution — sort key, or a different event order?


r/leetcode • • 1d ago

Intervew Prep Day 12: worked through 4 Binary Search problems including Rotated Sorted Array I & II

14 Upvotes

Hey everyone,

I finished Day 12 today and continued working through Binary Search patterns with four problems:

  1. First and Last Position of an Element in a Sorted Array: Reused the Lower Bound and Upper Bound implementations from yesterday to find the starting index (lowerBound) and ending index (upperBound - 1) in O(log n) time.
  2. Count Occurrences in a Sorted Array: Built directly on the same bounds—subtracting the first occurrence from the last (upperBound - lowerBound) gives the exact frequency in O(log n) time.
  3. Search in Rotated Sorted Array (Distinct Elements): At first, I had trouble figuring out how to avoid O(n) traversal, so I watched an explanation to lock in the core invariant: even after rotation, at least one half around mid is always sorted. By identifying the sorted half (nums[low] <= nums[mid] or nums[mid] <= nums[high]), you check whether the target falls within its boundaries and discard the other half in O(log n) time.
  4. Search in Rotated Sorted Array II (With Duplicates): Extended the same logic to handle duplicate values. When nums[low] == nums[mid] == nums[high], it is impossible to tell which half is sorted, so you shrink the search space from both ends (low++, high--) before continuing. This keeps average runtime at O(log n) while degrading to O(n) only in worst-case duplicate-heavy inputs.

Getting the rotated array invariant clear made a big difference today.

See you guys tomorrow for Day 11!


r/leetcode • • 1d ago

Intervew Prep Looking for system design mock interview partner for IC5/6 roles

7 Upvotes

f you're preparing for SD interviews, I'm looking for someone to partner with and do weekly mocks if possible.

I'm in PST timezone but flexible on timing.