u/StrawberryWards

Roast my approach to solve this question: Coffee Ordering System (Salesforce interview question)

Roast my approach to solve this question: Coffee Ordering System (Salesforce interview question)

I've been practicing system design by turning my solutions into visual diagrams (helps me think + great for review later).

Here's my attempt at the Salesforce Coffee Ordering System question that's been popping up in interviews:

[Infographic attached]

The question asks you to design:

  • Menu browsing + order placement (pickup/in-store)
  • Customizations (size, milk, add-ons) with price calculation
  • Payment processing
  • Barista queue with status updates (PLACED → IN_PROGRESS → READY)
  • Real-time status for customers
  • Scale from 1 store → thousands of stores

What I covered:

  • Microservices split (Menu, Order, Payment, Notification)
  • Event-driven architecture with message queue
  • PostgreSQL for orders, NoSQL for menu (read-heavy + cached)
  • WebSocket for real-time customer updates
  • Idempotency keys, retries, dead letter queue, saga pattern

Where I'm unsure:

  • Should payment be synchronous or async?
  • Is sharding by storeId enough, or should I also consider time-based partitioning for order history?
  • How would you handle a barista tablet going offline mid-shift?

Be brutal, what did I miss?

Question source: PracHub (Salesforce Interview Questions). Making more of these if people find them useful. Let me know in comments if you want the link.

u/StrawberryWards — 1 day ago
▲ 20 r/CodingJobs+1 crossposts

Got this nested string expansion question in my Waymo AI round. Want to know if I overthink the recursion limit?

I had my Waymo AI round friday this week and got a string parsing question that felt surprisingly straightforward, but I think I might have over complicated my approach by trying to anticipate system limits.

The interviewer asked me to write a function that expands a nested string containing repetition expressions. It looked a lot like regex unrolling. Basically, you get an input string where parts of it are wrapped in parentheses, immediately followed by a multiplier in curly braces. So if the input is `a(b(c){2}){2}`, you have to expand the inner part to `cc`, making it `bcc`, and then expand that twice to return `abccbcc`.

My first instinct was to just write a recursive function. Recursion maps perfectly to nested grammatical structures like this. But then I stopped and thought about the context. It was in a Waymo AI round, so they are probably testing for system constraints and robustness. If they threw a massive string with deep nesting at a recursive Python script, it would hit the recursion depth limit and trigger a StackOverflow error.

I decided to solve it using an explicit iterative stack instead to completely bypass the depth limit risk.

I iterated through the characters while maintaining a list to track my current scope. Every time I hit an opening parenthesis, I pushed my current list onto the stack to save my progress and started a fresh list for the inner group. When I hit a closing parenthesis, I grabbed the multiplier from the curly braces, multiplied my built inner string, popped the previous context off my stack, and appended it all together. I also specifically used a list of characters with a final string join rather than doing standard string concatenation to avoid creating a massive memory bottleneck under heavy loads.

The interviewer seemed satisfied, but he didn't push back or ask many follow-up questions, which always makes me nervous.

I've been drilling parsing questions on NeetCode and GeeksForGeeks for weeks trying to prepare for this. I found the almost similar variant of this question uploaded on prachub , and the community solutions there are split 50/50 between recursion and explicit stacks.

For those of you who do interviews for these AI-heavy roles, what do you think how shall we approach these rounds?

did I overthink it? Is it better to just write the cleaner recursive solution and verbally mention the depth limits, or is the explicit stack the actual expected answer for a senior role?

u/StrawberryWards — 5 days ago
▲ 11 r/InterviewCoderPro+1 crossposts

Just finished my Harvey AI interview and wanted to share the two coding rounds since they were completely different from standard loops

I had my onsite for a backend engineering role at Harvey recently, and honestly I am still processing how it went. I feel okay about it but the format caught me totally off guard. They genuinely do not care about standard competitive programming puzzles which I was assuming and also on glassdoor and other platforms that they ask the programming puzzles but that was not the case.

(I made the diagram out of my solution using Gemini for you all to help)

The first question was a text processing problem where I was given a sentence and a list of tags, and I had to return the tags that appeared in the sentence as whole word matches. It had to be case-insensitive and ignore partial matches. So if the sentence contained "blueprint", the tag "blue" shouldn't trigger a match.

I almost started writing a massive loop before I caught myself and realized how bad the performance would be. I ended up talking through a hash set approach where I tokenized the sentence by spaces and stripped the punctuation off the edges of the words first. That way I could dump the sentence into a set and get constant time lookups for the single-word tags.

Then the interviewer asked how I would handle multi-word phrase tags. That completely breaks the tokenization logic as I had to scramble and pivot to using regex with word boundary markers. It was definitely a harsh reminder of how annoying string manipulation edge cases get in live interviews.

The second round was building a working in-memory file system from scratch. I had to support making directories, listing contents, writing files, and reading them back. I actually felt somewhat prepared for this one because I had focused a lot on object oriented design during my prep. Here I structured a generic node class where each node had a boolean flag to indicate if it was a file or directory, a string for the actual content, and a dictionary mapping names to child nodes. The hardest part was just keeping the path parsing clean when creating missing parent directories on the fly during a write operation. I spent way too much time getting confused by the append-to-file logic.

I have not been giving interviews very actively but getting interview almost every week. I am not practicing much for these interviews and just solving few problems and after my current job ends. I am not solving standard dynamic programming grids anymore, spending some time watching neetcode ones and whenever I get time, I read DDIA to prep my architecture and sometimes go with bytebytego, for questions, prachub got almost same questions I am getting in interviews. Also this community have been really helpful and I keep scrolling to read more from people.

Has anyone else interviewed there recently? Did they force you to execute the code against hidden test cases or did they mostly just care about the whiteboard architecture like they did for me?

u/StrawberryWards — 8 days ago
▲ 120 r/Backend

System design used to feel pretty standard. You draw a client, an API gateway, a cache, and a generic SQL database. If you knew when to say horizontal scaling, you passed. (Because I remember, in one of my interviews which I got selected, they didn't even ask any question.. but they just relied on my past work which I did well.

I just found out the hard way that this doesn't work anymore.

I had a Stripe onsite for a backend role yesterday. The prompt was to design a financial ledger system which I went with the standard setup and threw Postgres on the board with some read replicas. I thought I was doing great.

But then the interviewer started digging into the database layer like I was explaining him about ACID properties butr looked like he didn't want to hear that. He asked exactly how Postgres handles concurrent transactions when a user triggers events in two different geographic regions at the exact same millisecond. He wanted to know how Postgres specifically implements MVCC (Multi-Version Concurrency Control) and why that specific engine might cause transaction deadlocks under our proposed load.

I knew what MVCC stood for, but I had absolutely no idea how Postgres handled the locking under the hood. I felt like failed the round right there.

I was literally unprepared. If you draw a tool on the board, they expect you to know the engine internals, like whyyy the F??

I'm trying to figure out how to study for this without just reading raw database documentation for days. I've been rereading Designing Data-Intensive Applications (DDIA), but it stays pretty high-level. I also watched some Exponent videos on database scaling, and using prachub to look at actual Stripe-specific ledger questions to see what other deep-dives they ask.

I am looking to follow the stricter schedule so that I can make a switch as soon as possible..

Please let me know any such weird things that are happening in interviews these days.. I have around 4 years of experience in backend.

Also, one more question, do you just pick one database like Postgres and memorize the internals, or is there a better way to study for these deep-dive rounds?

reddit.com
u/StrawberryWards — 19 days ago

I just finished another long interview process, and I'm not even sure it was worth it. Like why do I have to jump through so many hoops just to prove I can code?

First, they will give you the coding challenge that often has nothing to do with the actual job. I get that algorithms and data structures are important, but some of these problems seem like they're straight out of a CS textbook from 1965. When was the last time someone asked you to balance a red-black tree on the job? Never? Same here.

Then, if you somehow survive that, there's the technical interview where you're grilled by someone who seems to enjoy watching you do mistakes. It's like they forget we're supposed to be on the same team. Do they really think creating a set of impossible questions will find the right candidate? It just finds people who are good at jumping through hoops, not necessarily those who can do the work.

And don't even get me started on the culture fit interviews. I mean why does every company ask tell us why you want to work here. I need the money, and your company offers free snacks. That's why. It's all a game, and honestly, it's exhausting. Just let me code in peace and prove my worth on the actual job instead of with these ridiculous interviews.

Also, I got rejected once for just saying I want to work remote when their most of the members were working remotely and my role didn't require at all to go to the office even if it is hybrid... But for this reason, they moved with another candidate... Like seriously??

Have any of you guys frustrated with these kind of things, how to vent out this sh*t?

reddit.com
u/StrawberryWards — 21 days ago