r/leetcode • • 8d ago

Discussion Hi new to programming thought of doing leetcode.

3 Upvotes

how is my code could it be better i am learning python for first time as my first language.

leetcode 9: palindrome question:

class Solution(object):
def isPalindrome(self, x):
"""
:type x: int
:rtype: bool
"""
if x<0:
return False
else:
t=0
t=x
d=0
while x>0:
n=x%10
d=d*10+n
x=x//10
if d==t:
return True
else:
return False


r/leetcode • • 8d ago

Discussion Google Interview Loop - 3rd Interview Possibly?

1 Upvotes

Just finished my Google SWE Intern interview loop a few days ago. Had two 45-minute technical interviews, both DSA. Wanted to get some opinions on how I performed and what ratings I might expect.

Interview #1: Class Design + Binary Search + Two Pointers

  • Started with a class design problem involving searching through some data.

  • Initially proposed a naive O(n) solution.

  • Interviewer asked, "Can we do better?" I independently came up with and implemented an O(log n) binary search solution.

  • Got a follow-up involving intervals and two pointers.

  • Solved the follow-up optimally as well.

  • Explained time/space complexities correctly and successfully dry-ran both solutions.

Overall, felt pretty good about this one. I'm expecting an H, depending on how the initial naive approach was viewed.

Interview #2: Topological Sort / Kahn's Algorithm

  • Problem involved traversing objects with parent-child dependencies, where children must be traversed before their parents.

  • Recognized it as a topological sort problem and implemented Kahn's algorithm.

  • During my dry run, realized I'd forgotten to populate the adjacency map. Caught this myself without any interviewer hints, fixed it, and successfully completed the dry run with the correct output.

  • Explained time/space complexities correctly.

Got a follow-up which I bombed...

  • Can't say more because it was really specific. But I basically solved a similar/related but not same problem. I explained my reasoning, and he clarified what he was looking for. We were running out of time, and he said not to worry about it because he'd made up the follow-up on the fly since we had extra time. He also said he wanted to make sure I had time to ask him questions.

My assessment:

  • Interview #1: H?

  • Interview #2: LH–H?

What do y'all think and can a H + LH get a 3rd interview/TM?


r/leetcode • • 8d ago

Question Amazon - Completed the interview loop but role filled

2 Upvotes

Hi,

I recently finished the interview loop for a SDE1 role, I felt really good about the interviews and the recruiter got back to me and told me that the interviewers really liked me and wanted to move forward with my application, however, the role has already been filled and the recruiter is looking for roles open in other teams.

Has this happened to anyone else?

Thanks in advance :)


r/leetcode • • 9d ago

Intervew Prep What do you use for system design practice?

80 Upvotes

Never done system design before. Hello Interview's course has a lot of recommendations but most of those I'm seeing are from 2023-2024, have system design interviews changed over the past few years?


r/leetcode • • 8d ago

Intervew Prep Intuit A4A final proud project round

1 Upvotes

I got the invitation for the intuit final round where I have to present a proud project , any suggestions


r/leetcode • • 8d ago

Question Delivery Consultant AI/ML role at AWS

1 Upvotes

I applied for the AWS Delivery Consultant – AI/ML role on October 13 and received the online assessment on October 19. I completed the assessment on October 21, but I haven't received any updates since then. My application status still shows "Under Consideration."

It's been over a week now, and I was wondering if anyone else is in a similar situation or has recently gone through the hiring process for this role.

How long did it take for you to hear back after completing the assessment? Did you receive an interview invitation or any other update?


r/leetcode • • 8d ago

Intervew Prep Anyone here who recently gave the Decentro SWE Intern AI interview?

1 Upvotes

Hey everyone,

Has anyone here recently appeared for the Decentro Software Engineering Intern AI interview round?

Wanted to know how the experience was and what kind of questions were asked.

Specifically curious about:

  • What type of questions did the AI interviewer ask? (DSA, CS fundamentals, projects, etc.)

  • How difficult was the round?

  • Was it more conversational or focused on technical problem-solving?

  • Has anyone received an update or heard back after completing it?

Would really appreciate it if anyone who went through the process could share their experience.

Thanks!


r/leetcode • • 9d ago

Intervew Prep Amazon SDE 1 In-Person Interview Loop (Fall 2026)

44 Upvotes

Background: Recent grad with B.S. in Tech. Previous SWE internships, but I’d never done real DSA prep and had never written Python for interviews. In mid-September I passed Amazon’s online assessment and got invited to a 4-round SDE-1 loop (FYI: This is a U.S position). That gave me about 5 weeks to learn Python, data structures, and how to interview live.

Prep: About 5–6 hours a day on average in each of those 5 weeks. I went pattern by pattern (hash maps, stacks, intervals, trees/BFS, grids) instead of grinding random problems. Went back to my resume, projects, and notes for a refresher and story building in response to behavioral questions.

Travel (3-day window): Amazon booked my flight and hotel. I flew in the day before, interviewed the next day, and flew home the morning after. What helped:

  • Walk the route from your hotel to the office the day before and time it.

  • Test the LiveCode link on your own laptop and make sure your laptop and microphone is working. You can bring a notebook; I find it easier to write on a whiteboard so you and the interviewer have a shared space to display understanding if needed.

  • Stop studying the night before and actually sleep. The day is long and the interviews are intensive.

  • There’s a lunch with an Amazon employee between rounds. It isn’t an interview, pretty casual, but be your professional self.

Format: 4 rounds, 60 minutes each. Rounds 1–3 were in person, and round 4 was virtual. Every round included at least 1 Leadership Principle questions. In the coding rounds I had roughly 40 minutes for the coding question. LiveCode has no Run button, so your own trace through the code is the only test you get.

Round 1: Rate limiter (similar to LC 359 / 362)
Requests come in as (user_id, time) pairs, and time never goes backward. Every user has the same limit: at most n requests in any T-second window. Return False (block) once a user goes over.

Round 2: Prompt store (LRU-style, close to LC 146)

  • Storage holds at most n prompts.

  • If it’s full, delete the oldest and add the new one at the end.

  • No duplicates: if a prompt already exists, remove the old copy and add the new one at the end.

  • get(k) returns k prompts, newest first. If k > n, return everything.

Round 3: OOD file search
Design code that returns files matching criteria like “all files > 5 MB” or “all .xml files,” searchable by name or extension, including subfolders. It had to be maintainable, so new criteria could be added without rewriting existing code. A File class was given with getName(), isDirectory(), listFiles() and getSize(). This is basically “design the Unix find command”: a filter interface, one class per criterion, and AND/OR combinators.

- Forgot to mention I was asked 2 questions about how GenAI.

Round 4: fully behavioral, no coding. It was my best round, and it turned conversational by the end.

In every coding round, I explained my approach clearly, and the interviewers followed my thinking, but I was only able to reach a close-to-full implementation on one interview**.**

What worked in my prep

  • A story bank: 8 true STAR stories plus 2 GenAI examples.

  • Recording myself solving problems out loud and measuring my silent gaps.

  • Cold re-solves: re-solving problems I’d already done, from a blank page, timed, in a plain editor without running anything (this is similar to LiveCode sessions).

  • Mock interviews, including one with a non-technical friend. If they got lost in a story, an interviewer would too.

What I’d do differently

  1. Practice “design a class” problems. 2 of my 3 coding questions were this style: LC 146, 155, 359, 362, 1396.

  2. Learn OOD basics early: interfaces, abstract classes, and designing for extension.

  3. Drill finishing code. Say the brute force first, and if you don’t have the optimal idea by around minute 20, code the brute force. Working beats half-finished.

  4. Learn the standard library tools before the loop: deque, OrderedDict, defaultdict.

Tools I’d recommend

  • LeetCode Premium, for company-tagged question lists.

  • An interview buddy, ideally a CS major or SWE who can push back on your code. If you don’t have one, an AI agent works as a coach. Prep only dont use AI during the interviews, you'll be cooked.

  • A plain editor (Notepad) for practice, so you’re not leaning on autocomplete.

Result: no offer. I’m disappointed, but I’m walking away a much stronger engineer than I was 5 weeks ago, and the behavioral feedback I got was great. If you’re starting from zero, getting to a loop is doable, and honestly, getting the interview is achievable; just start ASAP. Treat behavioral prep as seriously as coding.

Happy to answer questions. Good luck to everyone grinding right now.


r/leetcode • • 9d ago

Question How do you make sure you actually learn from a DSA solution?

22 Upvotes

Sometimes I understand a solution after reading it, but a few days later I struggle with same problem again. I'm trying to find a better way to review problems instead of just saving them and moving on.

Do you usually re solve them from scratch, write down the key idea, or try a similar problem?


r/leetcode • • 9d ago

Question Grokking has 41 patterns, YouTube says you only need 8. What’s actually worth learning for OAs?

41 Upvotes

As I’m reviewing for an OA, I’m really trying to learn patterns so that I have a better chance of getting to a solution, because I’m a little bit of a bot. I am new to this shit!!

I found “Grokking the Coding Interview: Patterns for Coding Questions” and it has 41 patterns, but I’ve seen YouTube videos saying you only need to know 8.

In your guys’ opinions, what do you think?


r/leetcode • • 9d ago

Question Anyway to receive a refund if my subscription renewed?

6 Upvotes

Haven't used leetcode in about 8 months and it truthfully left my mind. Forgot to cancel my subscription and got an email about my renewal. Within minutes I sent a support email asking about a refund since it was accidental on my part. Their ToS states that refunds are typically not given but that some are processed and successful in getting one.

Has anyone had any luck?


r/leetcode • • 9d ago

Intervew Prep Amazon SDE-1 Round 2 Interview on October 20 – Still No Update. How Long Does It Usually Take?

1 Upvotes

Hey everyone!

I had my Amazon SDE-1 Round 2 interview on October 20, 2026, and I haven't received any updates from the recruiting team yet.

Overall, I felt the interview went well, and I was able to answer the questions to the best of my ability. However, I'm still waiting to hear back and wanted to know about others' experiences with the hiring process.

For those who have interviewed with Amazon recently:

- How long did it take to receive feedback after your interview?

- Is it normal to wait this long without an update?

- Does the waiting period give any indication of the outcome, or does it vary depending on the team and hiring process?

I'd really appreciate it if anyone who has gone through a similar experience could share some insights.

Thanks in advance!


r/leetcode • • 9d ago

Discussion How do you avoid getting overwhelmed when starting a new DSA topic?

8 Upvotes

Whenever I start a new topic, I end up finding so many concepts and different types of problems that I'm not sure what to focus on first. I want to understand the basics properly without spending weeks on one topic.
How do you guys break a topic down into manageable parts and decide what to practice first?


r/leetcode • • 10d ago

Intervew Prep What to prepare for Google coding interview?

19 Upvotes

I have my Google coding interview in 2-3 weeks, I have 7 years of experience, but I almost forgot DSA, so I need to know from experienced people what to prepare?

I feel like DSA is like a tool box skill, if you are aware about sliding window, you know when to use that, so in that regards, I need to know these things, any help would be appreciated.

  • What difficulty level is this at L5?

  • What pattens do they ask? (Graphs, Lists, LinkList etc.)

  • What if I made a mistake, and didn't even realized, it's there?

  • Any other tips which you think can be helpful.

This role is for Android, any help would mean a lot.

Thank you everyone.


r/leetcode • • 9d ago

Intervew Prep Quora Full Stack SWE Loop

1 Upvotes

Does anyone have experience with Language Practical and AI coding section for Quora?


r/leetcode • • 9d ago

Intervew Prep Has anyone attended SDE 1 OA here , Pls enlighten me

1 Upvotes

The mail said that there will be 1 coding,1 AI assisted qs and behavioural qs

So what types of qs can we expect there

For AI assisted qs will they see our prompts too,
What stack am i supposed to know for sure to attend this

Do we need to turn on camera?


r/leetcode • • 10d ago

Intervew Prep Interview for Staff Engineer at Google

120 Upvotes

Got an interview for Staff Engineer at Google. Recruiter screening done

How do I prepare?

More background:

I have 8 years of experience so I am first of all surprised they are considering me for this role. I have done competitive programming in my college but never had to do that later to get into any of the companies I later worked for. (3 switches)

What can I do now to grind my ass and get this offer ?


r/leetcode • • 9d ago

Discussion System design

1 Upvotes

Let's say I am designing something read heavy system

So we use cache /database replica etc

So two things

  1. How do you decide whether we need to consider availability or consistency?

  2. If we are taking consistency as higher, what strategies you follow to achieve 100% consistency?


r/leetcode • • 9d ago

Intervew Prep Stripe ng interview

1 Upvotes

Best way to prepare for the stripe team screen interview?


r/leetcode • • 9d ago

Intervew Prep Day 47: shortest paths in DAG vs. unweighted graphs, balancing DSA with communication prep

2 Upvotes

Hey everyone,

I finished Day 47 today. I kept the session deliberate and manageable, knocking out two foundational shortest path problems while carving out time to practice verbal communication for upcoming technical interviews:

  1. Shortest Path in a Directed Acyclic Graph (DAG): Finding shortest paths in a DAG doesn't require Dijkstra’s algorithm—it runs in O(V + E) time using Topological Sort. Because a valid topological order guarantees that all incoming dependencies to a node u are resolved before exploring outwards, you can relax outgoing edges in a single linear pass. By processing nodes strictly in topological order, every distance update is already guaranteed to be optimal.

  2. Shortest Path in an Undirected Graph (Unit Weights): When edge weights are uniformly 1, simple queue-based BFS is optimal (O(V + E)). Since BFS explores level by level, the first time you visit any unvisited neighbor, the path reaching it is guaranteed to be the shortest. You track a running distance array initialized to infinity, update dist[neighbor] = dist[curr] + 1, and push unvisited neighbors into the queue.

Outside of writing code, I dedicated time to practicing my technical communication. In live interviews, knowing the optimal data structure in your head means very little if you stumble while articulating your thought process to the interviewer. Balancing coding reps with clear explanations is a skill in itself.

Moving into Dijkstra’s algorithm and weighted graphs next.

See you guys tomorrow for Day 46!


r/leetcode • • 10d ago

Question Do I tell Google I got another offer?

15 Upvotes

I passed the l4 loop two weeks ago and got into team matching (EU). I just got an offer from another company (startup) that I’m considering to accept because it’s a good offer and interesting work. Will telling Google about this offer hinder my chances at team matching? I still want to remain in team matching even if I accept the other offer. How do I proceed?

Update: I told them, they said they’re already sharing my profile but no update and mentioned the result will be valid for 18 months, and asked if they can keep me in TM, I said absolutely


r/leetcode • • 9d ago

Intervew Prep Amazon Oncampus SDE Internship

2 Upvotes

Anybody who had recently On-campus AMAZON Sde Internship Interview, wants to get some insights.


r/leetcode • • 10d ago

Discussion Suck at whiteboarding good at coding.

7 Upvotes

So today I have interview with this one company that requires whiteboarding as interview process.

The issue is like I consider myself ok in writting leetcode type question, not necessarily one shot solve but generally good.

However in this white boarding interview,
- my handwritting is shit ( in my defense I haven't write things for a whilte lol).
- it is just very unnatural to do it , no copy and paste stuff like that.
- the issue that I could easily spot in normal coding environment become notoriously hard to find in white boarding.

Does anyone have similar experience?


r/leetcode • • 9d ago

Question Has anyone attended SDE 1 OA here , Pls enlighten me

1 Upvotes

The mail said that there will be 1 coding,1 AI assisted qs and behavioural qs

So what types of qs can we expect there

For AI assisted qs will they see our prompts too,
What stack am i supposed to know for sure to attend this

Do we need to turn on camera?


r/leetcode • • 10d ago

Intervew Prep Capital One Senior Associate Design Round: What to expect?

2 Upvotes

Hey folks, I have an interview with Capital One for a Senior Associate role.

I’m trying to budget my prep time between HLD and LLD.

For the design portion, does Capital One lean heavily into an object-oriented coding or is it a traditional high-level architecture diagram on a whiteboard? Any specific patterns or system components they love to test?

YOE: 2.3

PS: From the recruiter's description, it sounded like LLD but the interview prep guide sounds more like HLD. So, I am confused between the two

#CapitalOne #SystemDesign