Intuit interview prep: live API build in a Spring Boot codebase 10 questions in 4 chapters
- 01The loop2 questions
- 02Phone screen: coding and fundamentals4 questions
- 03Live API build: the topics behind the code4 questions
- 04Sources
The loop · 2 questions
The five reported rounds and what each one checked.
1.1 What does the reported Intuit Software Engineer 2 loop look like, and how should you prepare? Medium The reported loop had five rounds. A phone screen with linked list coding, CAP and ACID, and a project walkthrough. Then a ninety-minute li…
Full answerThe 30 second answer
The reported loop had five rounds. A phone screen with linked list coding, CAP and ACID, and a project walkthrough. Then a ninety-minute live build of two APIs in a Spring Boot codebase they shared a week before. A code and testing round. An AI and machine learning round. And a managerial round. So I'd drill linked lists, set up their project early, and practise building a clean, tested API out loud.
1.2 How do you build a new API live in a Spring Boot codebase you were given in advance? Medium I start by restating the requirements and agreeing the request and response shapes, then follow the codebase's existing layers: a thin cont…
Full answerThe 30 second answer
I start by restating the requirements and agreeing the request and response shapes, then follow the codebase's existing layers: a thin controller with validation, a service that owns the business logic and transactions, and a repository for data access, with DTOs at the edge. I add pagination with a capped page size, map errors centrally to clear responses, check security and rate limits, and write a test for each endpoint, explaining each choice as I go.
Phone screen: coding and fundamentals · 4 questions
The linked list problems and the CAP question from the first round.
2.1 How do you reverse a singly linked list, iteratively and recursively? Easy Iteratively, I walk the list with two pointers, prev and curr. At each node I save next, point curr back at prev, then move both forward; a…
This was the first coding question in the reported phone screen, asked in both iterative and recursive forms.
Full answerThe 30 second answer
Iteratively, I walk the list with two pointers, prev and curr. At each node I save next, point curr back at prev, then move both forward; at the end prev is the new head. That's O(n) time and O(1) extra space. Recursively, I reverse the rest of the list first, then make the next node point back to the current one and clear the current node's next. That's O(n) stack space, so very long lists can overflow.
2.2 How do you find the middle node of a linked list in one pass? Easy I use two pointers, slow and fast, both starting at the head. Slow moves one node per step and fast moves two, so when fast reaches the end…
The reported screen followed reversal with the middle node, the standard slow and fast pointer check.
Full answerThe 30 second answer
I use two pointers, slow and fast, both starting at the head. Slow moves one node per step and fast moves two, so when fast reaches the end, slow is in the middle. That's one pass, O(n) time and O(1) space, without counting the length first. For an even-length list this version returns the second of the two middle nodes, so I'd confirm which one the interviewer wants.
2.3 How do you reverse a linked list in groups of k? Hard I put a dummy node before the head and keep a pointer to the node before the current group. For each group I first check that k nodes remai…
Reversing in groups of k was the hardest linked list follow-up in the reported screen.
Full answerThe 30 second answer
I put a dummy node before the head and keep a pointer to the node before the current group. For each group I first check that k nodes remain; if not, I leave the tail as it is. Then I reverse those k nodes with the usual three-pointer loop, starting prev at the node after the group so the reversed group stays connected, and move the group pointer to the old first node. O(n) time, O(1) space.
2.4 What is the CAP theorem, and how do you use it in a design? Medium CAP says that when a network partition splits a distributed system, each side must choose: refuse some requests to stay consistent, or keep…
The reported screen asked about CAP and ACID together, so know how the two differ.
Full answerThe 30 second answer
CAP says that when a network partition splits a distributed system, each side must choose: refuse some requests to stay consistent, or keep answering and risk stale or conflicting data. Partitions aren't optional, so it's really C versus A during a partition, not pick any two. I make that choice per operation: payments and inventory stay consistent, while browsing and recommendations stay available.
Live API build: the topics behind the code · 4 questions
Pagination, error handling, request flow and rate limiting, as discussed in the live round.
3.1 OFFSET pagination is slow on page 5,000. Why, and how do you fix it? Medium With OFFSET, the database still reads and throws away all the skipped rows, so a deep page means scanning a huge number of rows just to ret…
Pagination came up in the live build, and the oversized page value in the later round is the scenario the candidate reported missing.
Full answerThe 30 second answer
With OFFSET, the database still reads and throws away all the skipped rows, so a deep page means scanning a huge number of rows just to return a few. The fix is keyset pagination: remember the last sort key and ask for rows after it, with an index on the sort columns. Every page then costs about the same.
3.2 How does Spring Boot handle exception translation? Medium I'd distinguish data-access translation from web exception handling. In data access, Spring turns database-specific exceptions into its unc…
Global exception handling was one of the explicit discussion points in the live build.
Full answerThe 30 second answer
I'd distinguish data-access translation from web exception handling. In data access, Spring turns database-specific exceptions into its unchecked DataAccessException hierarchy. Spring Boot configures PersistenceExceptionTranslationPostProcessor to apply supported translation to @Repository beans through proxies. In the web layer, Spring MVC uses HandlerExceptionResolver implementations, including @ExceptionHandler methods in @ControllerAdvice, to produce HTTP responses, potentially using ProblemDetail. Spring Boot also provides BasicErrorController as a fallback for otherwise unhandled web errors.
3.3 What happens internally when you hit a REST endpoint? Hard In a servlet application, the server accepts the request and runs it through the filter chain, including Spring Security if configured. Dis…
Knowing the request path from the dispatcher to the controller helps you place validation, security and error handling in an unfamiliar codebase.
Full answerThe 30 second answer
In a servlet application, the server accepts the request and runs it through the filter chain, including Spring Security if configured. DispatcherServlet uses a HandlerMapping to find the controller method and interceptors. A HandlerAdapter resolves arguments, applies validation where requested and invokes the method after interceptor checks. A message converter then writes the response body. If processing throws, HandlerExceptionResolver implementations can route the exception to an @ExceptionHandler, often declared in @ControllerAdvice.
3.4 What is your API gateway strategy for auth, rate limiting, routing and tenant isolation? Hard The gateway, for example Spring Cloud Gateway or AWS API Gateway, validates the token, routes by path or host, and rate-limits per client o…
Security and rate limiting were discussed in the live build, and the gateway is the usual first place for both.
Full answerThe 30 second answer
The gateway, for example Spring Cloud Gateway or AWS API Gateway, validates the token, routes by path or host, and rate-limits per client or tenant. For tenant isolation I put the tenant ID in the token and give each tenant its own limit, so one noisy tenant can't starve others. Each service still checks tenant access itself, because the gateway should not be the only defense.