Intuit Interview Questions
- DSA
- LLD
- HLD

Q1: Reverse a Linked List (Iterative & Recursive)
Description: Given a singly linked list, reverse it using both iterative and recursive approaches, taking care of null and single-node lists.
Key Approaches:
- Iterative: Track previous/current nodes, update pointers in a single traversal.
- Recursive: Base case on null/one node, reverse sub-list and re-point nodes.
Q2: Find Middle of Linked List
Description: For a singly linked list, find the node in the middle of the list.
Key Approaches:
- Use slow and fast pointer (tortoise and hare) for a single traversal, stopping when fast reaches the end.
Q3: Reverse in k-sized Groups
Description: Given a linked list, reverse every consecutive group of k nodes in place.
Key Approaches:
- Partition list in groups, reverse each using pointer manipulation, handle incomplete groups at the end.
Q4: Valid Parentheses
Description: Check if a string containing (), {}, [] is balanced (every open bracket has a corresponding close in the correct order).
Key Approaches:
- Stack for pushing opening brackets and matching with closing, fail on mismatch or leftover stack.
Q5: Two Sum in List of Key-Value Pairs
Description: Out of all key-value pairs, find any one pair of values whose sum is equal to a target value.
Key Approaches:
- Brute force (O(n^2)), sort/binary search (O(n log n)), or hashmap (O(n); store seen values, check for complement).
Q6: Reverse Words in a String (In-Place)
Description: Given a string, reverse the letters in each word in place, using only constant extra space.
Key Approaches:
- Track word boundaries, swap letters within each word in-place.
Q7: Rotten Oranges
Description: Given a matrix where each cell is orange (fresh, rotten, or empty), determine the time needed for all oranges to rot, where rotting spreads to adjacent cells each minute.
Key Approaches:
- BFS from all initially rotten oranges, count levels/minutes as rot spreads.
Q8: Next Permutation
Description: Given an array, rearrange into the next lexicographically greater permutation. If none exists, return the lowest possible order.
Key Approaches:
- Find pivot, swap with next larger, reverse suffix.
Q9: Maximum Rectangle in a Histogram/Matrix
Description: Find area of the largest rectangle of 1’s in a binary histogram or matrix.
Key Approaches:
- Stack for heights (histogram), DP for maximal submatrices.
Q10: Maximum Sum of Non-Adjacent Elements
Description: Given an array, find the maximum sum possible such that no two chosen elements are adjacent.
Key Approaches:
- Dynamic programming: for each index, max(include current + i-2, exclude + i-1).
Q11: Longest Consecutive Subsequence in Array
Description: Given positive integers, find the longest subsequence where all numbers are consecutive.
Key Approaches:
- HashSet and check each possible start for sequence, O(n).
Q12: Height of Binary Tree (Recursive & Iterative)
Description: Given a binary tree, return its height using both recursion and iteration.
Key Approaches:
- Recursion: one plus max height of left/right.
- Iteration: Level order/BFS counting levels.
Q13: Stack using Queue
Description: Implement a stack using standard queue operations.
Key Approaches:
- Use two queues or single queue and rotate on push/pop.
Q1. Spring Boot Project: REST API & Service Layer
Description: Add or extend APIs in a given Spring Boot codebase, designing the controller, service, and data layers. Implement pagination, error handling, and write unit/integration tests.
Key Approaches:
- Layered architecture: Controller → Service → Repository, DTOs for API contracts, JUnit for tests, exception mappers.
Q2. Machine Coding: Todo List (CRUD)
Description: Implement add, delete, mark-complete, and search for a todo list.
Key Approaches:
- Maintain task state in in-memory structures; OOP for task management.
Q3. Student & Teacher OOP Classes
Description: Design base class (SchoolMember), and extend for Student and Teacher with common and unique properties. Implement methods like getTotalStrength(), getStudentInfo(), getTeacherSubjects().
Key Approaches:
- Inheritance, encapsulation, clean method signatures, override where needed.
Q4. Producer-Consumer with BlockingQueue (Java)
Description: Use Java concurrency to implement producer and consumer logic using a blocking queue.
Key Approaches:
- Synchronization, proper use of BlockingQueue’s thread-safe put and take methods.
Q5. Car Pooling Application (Spring Boot)
Description: End-to-end code for a ride-sharing platform, including user journeys, ride booking, and robust RESTful design.
Key Approaches:
- Domain-driven design, user auth, booking management.
Q1. CAP Theorem & ACID Properties Discussion
Description: Explain the CAP theorem, database isolation levels, and when to use systems that prioritize consistency, availability, or partition-tolerance.
Key Approaches:
- CAP trade-offs, SQL vs NoSQL, transaction management strategies.
Q2. Online Bidding System
Description: Architect a scalable, robust system for online bidding (auctions), handling thousands of concurrent users, efficient bid submission, and real-time winner updates.
Key Approaches:
- Microservice architecture, event queues for high update velocity, scalable data stores.
Q3. E-commerce Platform
Description: End-to-end system design for modern e-commerce, covering catalog, orders, inventory, payments, user management, scaling, caching, resiliency.
Key Approaches:
- Modular services, database sharding, rate limiting, load balancers, distributed caching, eventual consistency where necessary.
Q4. API Robustness, Pagination, Scalability
Description: Design APIs to efficiently handle heavy loads, proper pagination, rate limiting, error handling, and handle thundering herd problem.
Key Approaches:
- Token/cursor-based pagination, circuit breakers, retries, exponential backoff.
Q1. Machine Learning Basics and Vector Database
Description: General discussion on core ML principles — what is machine learning, when to use, K-means clustering, RAG (retrieval augmented generation), vector embeddings/DB, reinforcement learning, neural networks.
Key Approaches:
- Explainable, high-level overviews, with application to real projects where possible.