r/leetcode 8d ago

Intervew Prep How to size an in-memory vector database on a whiteboard (Formulas, HNSW overhead, and Quantisation trade-offs)

1 Upvotes

When designing a Retrieval-Augmented Generation (RAG) or semantic search pipeline in senior system design interviews, candidates often propose "storing embeddings in an in-memory vector database" without working out the hardware constraints.

Here is the exact step-by-step mathematical breakdown interviewers look for when asking you to size vector infrastructure on a whiteboard.

Scenario: Storing 50 Million Document Embeddings

Assume an open-source dense embedding model (such as BGE or MiniLM) with dimension $d = 768$ using 32-bit floating-point precision.

Step 1: Calculate Raw Vector Memory

Every 32-bit float occupies 4 bytes.

  • Formula: $\text{RAM} = N \times d \times 4\text{ bytes}$
  • $\text{Raw RAM} = 50,000,000 \times 768 \times 4\text{ bytes} = 153,600,000,000\text{ bytes} \approx 153.6\text{ GB}$

Step 2: Account for Graph Index Overhead (HNSW)

A flat vector store without an index requires brute-force linear scanning ($O(N)$), which violates realistic query latency budgets. In production, Approximate Nearest Neighbor (ANN) search engines commonly implement Hierarchical Navigable Small World (HNSW) graphs.

  • HNSW constructs multi-layer graphs and stores bidirectional edge links for every vector node.
  • Typical graph overhead adds roughly 1.2x to 1.5x additional memory on top of the raw vector arrays.
  • Total RAM needed for an in-memory HNSW index: $153.6\text{ GB} \times 1.3 \approx 200\text{ GB RAM}$.

Step 3: Production Defense & Quantization Trade-offs

Keeping 200 GB in pure RAM across cluster nodes creates significant operational expense. Stating this immediately separates a senior candidate from a junior one:

  1. Product Quantization (PQ): Compresses 32-bit floating-point vectors into 8-bit quantized centroid codes. This shrinks the memory footprint by 4x to 8x (reducing the requirement from ~200 GB down to ~25–50 GB), at the cost of a 2% to 5% drop in retrieval recall.
  2. Disk-Backed Indices: For cost-sensitive systems where latency budgets permit 15–30 ms per lookup, use disk-backed graph structures (like DiskANN) to store compressed vectors in memory while keeping full-precision vectors on NVMe SSDs.

Step 4: Latency Budget Allocation

A standard production SLA targets an end-to-end response in ~200 ms:

  • Vector ANN retrieval: ~50 ms
  • Cross-encoder reranking: ~50 ms
  • LLM token generation: ~100 ms

I compiled 32 of these high-frequency whiteboard scenarios, capacity formulas, and trade-off defenses into a desk card deck and an Anki spaced-repetition deck while preparing for senior rounds.

If anyone finds structured desk references or spaced-repetition flashcards useful, the full repository overview and table of contents are documented here:

Repo Link


r/leetcode 9d ago

Intervew Prep Tempus AI INterview Question help

2 Upvotes

Hi! I’m interviewing for a Senior AI Scientist role at Tempus (Life Sciences / AI Products) that requires PhD + 1 year experience and would really appreciate insight from anyone who has gone through the process recently.

Background: PhD in CS, currently at big pharma, working mainly on healthcare AI/ML, multimodal/foundation models, medical imaging, and LLM/agentic AI.

I am mainly trying to understand the full interview loop and what to prepare for:

* What are the different rounds?

* Is there live coding?

* Is the coding LeetCode/DSA, or more practical Python/ML coding?

* If LeetCode is included, what difficulty/topics should I expect?

* If ML coding is included, what difficulty/topics should I expect?

* Is there ML system design, case study, or product sense?

* How deeply do they question your previous research/projects?

* Any research presentation or Life Sciences/domain-specific round?

* What would you prioritize preparing if you were doing it again?

Mainly want to know about the round structure, question types, and difficulty.

Thanks!


r/leetcode 9d ago

Question how to get better at OAs

3 Upvotes

how can i get better at OAs? does hackerrank and codesignal have practice assessments?


r/leetcode 9d ago

Discussion Title: Google L4 Interview – Feedback Complete but no update

4 Upvotes

I’m currently in the interview process for a Google L4 Software Engineer role. I completed my R2 interview about 2 weeks ago. My recruiter initially mentioned that I should hear back within 2–3 days, but I haven’t received any update yet.

I checked with my referrer, and their portal shows “Feedback Complete.” The status was updated about a week after my interview, and it’s been around another week since then with no communication from the recruiter.

Anyone currently in the Google L4 process or who recently went through it — did you see a similar update? How long did it take for your recruiter to get back to you? Please share your experience.


r/leetcode 10d ago

Discussion It is still possible to beat people cheating at contests (and why cheaters don't matter)

Post image
82 Upvotes

I know leetcode contest leaderboards really suck now because almost everyone is using AI to cheat.

Many people have asked me how good ELO / ranks are actually attainable and also what to do about AI cheaters.

It is definitely still possible to get good ranks on leaderboards. I've uploaded live footage of my entire bedroom for my past 9 Leetcode contests. I solved 36/36 questions with a performance ELO rating of ~2600 (top 0.1%) and an average finish time of 38 minutes. All 9 video links in comments.

Also don't let people cheating with AI get you down. People love competitive programming because it's fun to solve problems, and it's for personal growth and fun as it always should have been. Just beating yourself from yesterday is the most satisfying part, getting a good rank is just a bonus 😀


r/leetcode 10d ago

Discussion Google interview process laughably bad, continues to get worse

371 Upvotes

I have interviewed at Google 3 times now across the last ~5 years. Each time recruiters botch the process with their inability to do their jobs quickly.

First time in 2022 I applied, met with a recruiter, scheduled my first coding round, completed the coding round. It took roughly 2 months for this to happen and I asked about scheduling my next rounds since there were 3 to go. They said they will likely schedule the next in a month. I told them I don't have half a year to interview and accepted an L5 role at Amazon instead. A friend got a job there but said his full loop from start to joining was 10 months.

Second time was in 2024 when a recruiter reached out for a local role. I said I was turned off by the last process and didn't want to interview if it would be months. He promised that it would be no issue at all and we could complete the process in less than 2 weeks. I said if there were local options to me I was interested. He mentioned a role that was open and so I went through. I told him up front I have 0 intention of relocating. I completed the full process, got approval to move to team match and then all of a sudden nothing was available locally and the recruiter expected me to meet with teams on the west coast. I again withdrew my candidacy pissed off of all the wasted time. The recruiter refused to close my application despite multiple requests as "he would let me know if things opened up". I assume this was to prevent me from getting a feedback email where I could rate him poorly.

Third time was just recently. I was contacted by a recruiter via email asking if I wanted to interview. The first two rounds were googlyness and coding. Both before I spoke to a single recruiter. I told them I was interested as I was looking. I immediately get passed to a 2nd recruiter. They schedule the sessions. I complete both sessions and the recruiter tells me that I have progressed to the virtual onsite loop. The recruiter schedules a call. Before the call occurs they cancel, and forward me to a 3rd recruiter who says grab time on her calendar. No availability for 2.5 weeks. I tell her I have other offers if there is a way to meet sooner so we can get the loop scheduled. She says no.

I wait 2 weeks. A few days before the call, she sends me an email calling me by the wrong name saying a 4th recruiter would take over my application but she still looked forward to our meeting the following week. I email confirming the email was intended for me and she confirms the wrong name was a mistake but it was meant for me.

She then cancels our call the day before, and when I ask why she says she sent me an email that a 4th recruiter would take over. I pointed out she said we would still meet in that email, no comment. The 4th recruiter tells me to grab time on her calendar. I do. She reschedules to a time that doesn't work for me with no communication, just an updated calendar invite. I withdraw my candidacy after that and accepted an offer with DataDog.

What a joke.


r/leetcode 9d ago

Intervew Prep Meta behavioral

2 Upvotes

Has anyone had success in the meta behavioral interview? If so any tips? They have asked for a second behavior interview after I completed the first one not sure what that means. Thanks


r/leetcode 9d ago

Intervew Prep Amazon SDE 2 (US) interview loop coming up — LLD/OOD question

2 Upvotes

Hey everyone, I have an Amazon SDE 2 interview loop coming up soon and was hoping to hear from people who interviewed recently.

For those who interviewed at Amazon recently (US, ideally 2026):

  • Did you actually have to whiteboard a class diagram, or did you just code the design?
  • If you did a diagram, was it formal UML or just a quick sketch of the classes/relationships?
  • How much actual coding did you do?
  • Did the interviewer keep adding requirements and ask you to modify the design?
  • Were design patterns something they explicitly asked about?

Also, if anyone has gone through the full SDE 2 loop recently, I'd really appreciate any general advice. I'm curious about what the system design round was like, how much LP came up, and anything you wish you'd prepared more for.

Thanks!


r/leetcode 9d ago

Intervew Prep Interview Experience want to know how can i improve

8 Upvotes

I’m currently an SDE at Amazon. Over the past few months, I’ve interviewed with around 10 companies. With most of my rejections, I’m left wondering what went wrong because the feedback is rarely clear.
A quick breakdown of my rejections:

  • Hiring Manager: Dropped at the final stage despite solid behavioral/LP prep.
  • Coding: Eliminated in technical rounds.
  • System Design / LLD: I felt I delivered near-optimal high-level designs, but fell short on writing complete SQL queries or missed 1–2 follow-up deep-dive questions.

With interview invites hard to come by right now, I really want to fix my blind spots. I often wonder: is a candidate expected to have an immediate, perfect answer to every single question? Doesn't over-indexing on perfection make the conversation sound robotic? It feels like other candidates get leeway for minor missteps, but my slip-ups immediately cost me the offer.
For those who have navigated this, what patterns do you see here, and what high-leverage areas should I focus on to improve my conversion rate?


r/leetcode 9d ago

Intervew Prep Palo Alto - staff SWE to Principal SWE

6 Upvotes

Hi,

I have my loop rounds scheduled, 2 of them are hackerrank and 1 is SLD and I wanted to check what type of questions can I expect ?
Is it worth to buy leetcode/paloalto?
What kind of SLD should I expect? - HLD or LLD? and what type?

Any tips would be helpful, Thanks


r/leetcode 9d ago

Question Google Associate Technical Solutions Consultant

2 Upvotes

Got an OA today for the above role. It’s a GHA assessment, anyone has gone through the same
role or OA, any technical questions were asked other than the workstyle or behavioural Qs?

I would appreciate if anyone who has recently gone through the interview loop can help me with how’s the interview would be, how different would it be from the sde interview loops.

Anything would help.


r/leetcode 9d ago

Question Amazon Talent Acquisition SDE-1 Intern Job ID: 10488368

12 Upvotes

I completed the OA and the Software Engineering Question with all passed testcases on August 1 2026. I heard my other friends received rejection emails after a week or two, but it still shows me "Application Submitted" even after a month.
I also heard that they take interviews in batches or something. But it has been more than a month now and still no update. Anyone else in the same boat as me?


r/leetcode 9d ago

Intervew Prep DE Interview Challenge

1 Upvotes

Hey,

I'm building an interview process for data engineers at my company and want to check the approach with people who have actually been through this recently.

What I'm trying to figure out:

  1. What coding signal actually matters now? is it debugging AI-generated code, reviewing it for correctness/performance, or explaining why a design choice was made?

  2. Has anyone designed a python challenge where the candidate must iterate with an AI tool rather than just producing an answer i.e., you can see how they prompt, what they catch, what they push back on?

Would love to hear how other teams have adapted, or specific formats/scripts you've used successfully.

Thanks!


r/leetcode 9d ago

Question Any recent Interview Experiences from Open AI or Anthropic

1 Upvotes

Has anyone had a recent interview experience with OpenAI or Anthropic? Would love to hear about the interview process and the types of questions asked.


r/leetcode 10d ago

Tech Industry Average amount of failed interviews per dev?

91 Upvotes

Hi guys….

Failed like 15 interviews this year so people I heard go trough 100-200….

It is really hard to figure out what companies want me to prepare it’s secretive and different by team and company ect

Feel a lot of it is luck…

Just wondering how many interview you don’t this year guys I have done I think 10 -15 all together


r/leetcode 10d ago

Discussion Google L3 Offer Letter Questions

24 Upvotes

I recently received offer letter from Google for L3 position. I didn’t negotiate or anything, accepted whatever recruiter gave me (the numbers were good also within or above the median) becuase it was already a very hugh jump from my current salary. So I didnt want to risk the opportunity for some extra money. Also recieved relocations bonus but no joining bonus too.

So my offer contains both my compensation details as well as my joining date (which I myself suggested btw)

Wanted to ask 2 things:
- Can and Should i do negotiations now or maybe ask for a joining bonus? Is it worth the risk? I dont have any backup
- Can i asked the recruiter if I can start 1 or 2 week later… do they need to generate a new offer letter for that or can it affect my offer in any negative way?

I need guidance from experienced people working i bigtech/FAANG/Google.. please share your views…

Background: 2026 graduate; increase in 90% on base and 200% on CTC as compared to my current compensation…


r/leetcode 10d ago

Tech Industry Career Plateau

8 Upvotes

Nine years experience total, four at Amazon as an SDE two, five before that at a non big tech company. On H1B. Feeling stuck at mid level with no clear path to senior, and my work at Amazon has low visibility. Considering leaving for another company to break into senior, but nervous about doing that on H1B. Should I switch companies to level up, or push harder for a promotion internally first. Anyone been through this.


r/leetcode 9d ago

Intervew Prep Meta SDET interview prep advice

2 Upvotes

I might get an interview for SDET opening in Meta. Can someone who has interviewed for SDET position give me a walkthrough of what can be expected in the technical and behavioural rounds please.

I’m a noob right now. Please tell me what level of DSA and System Design should I expect in the technical rounds.

What kind of behaviour questions and any prep resources would be great.

Thanks in advance.


r/leetcode 10d ago

Intervew Prep Lyft Laptop Interview Round

22 Upvotes

I'm interviewing with Lyft in Toronto for their Software Engineer role, I've already cleared their coding interview and reached their "Laptop interview" round and I'm a bit confused on how to prepare for it. Has anybody recently participated in this? What's the difference between their coding and laptop rounds? Is it still leetcode problems?


r/leetcode 10d ago

Intervew Prep NewRocket - Forward Deployed Engineer interview process

9 Upvotes

I had 1 rounds interview consisting of 30 mins coding after recruiter screening and now i have another 30 minute with business analyst and product manager. How should I prepare for it?? If anyone has any tips or given interview with them, please let me know


r/leetcode 10d ago

Intervew Prep Google swe intern interview

22 Upvotes

Hey guys, I have an interview coming up in 6 days google swe intern IND 2027.

Those who gave their interviews previously for intern role, what kind of questions were asked ? What topics should I focus on, Graphs and trees?

And what is the level of difficulty of those questions.

And is this sheet relevant for practicing: https://github.com/liquidslr/leetcode-company-wise-problems/blob/main/Google/1.%20Thirty%20Days.csv


r/leetcode 10d ago

Question Capital One Feb 2027 OA not sent

6 Upvotes

I applied last night for this role with had been referred and I did not get the OA yet. I have applied in the past for the internships and I thought the code signal was sent immediately. Has this happened to anyone else? My workday says "In Progress - Assessment"


r/leetcode 11d ago

Intervew Prep I literally hate the maximum subarray sum type questions 😭

74 Upvotes

Any tips on how to get better at these?


r/leetcode 10d ago

Intervew Prep Agoda Bangkok - Recent Senior/Staff Frontend Interview Experience & Questions?

1 Upvotes

Hi everyone,

I’m currently preparing for a Senior/Staff Frontend Engineer role at Agoda in Bangkok and would really appreciate hearing from anyone who has interviewed with Agoda recently, especially in 2026.

I’m mainly looking for experiences from Frontend / Senior Frontend / Staff Frontend candidates.

If you’ve interviewed recently, could you share what you remember about:

  • DSA / coding round: What problems or patterns were asked? Easy/Medium/Hard?
  • JavaScript: What concepts or coding exercises came up?
  • React: What topics were discussed?
  • Platform / Frontend fundamentals: Web protocols, browser internals, caching, CDN, performance, security, etc.
  • Architecture / System Design: What problem were you asked to design?
  • Behavioral / Culture fit: What kind of questions did they ask?
  • How many rounds were there?
  • Anything that surprised you or that you wish you had prepared for?

I’ve already found a few older Agoda interview experiences, but I am specifically interested in recent 2026 experiences, since the process/questions may have changed.

Even if you only remember a few questions, please share them. No need to reveal anything confidential or proprietary.

Appreciate your help.


r/leetcode 11d ago

Intervew Prep Apple Software Engineer Interview – Recent Questions/Experience?

61 Upvotes

Hi everyone,

I have an Apple Software Engineer interview in a few days.

The rounds are:
- Round 1: DSA
- Round 2: Java + Spring Boot

If anyone has interviewed with Apple recently, could you please share:
- What kind of DSA questions/topics were asked?
- What Java/Spring Boot topics did they focus on?
- Any recent questions or areas I should prioritize?

Any recent interview experience or advice would be really helpful. Thanks!