SDE1 Interview Questions
55 verified SDE1 interview questions from Google, Microsoft, Flipkart, Swiggy, Meta and more. Covers all experience levels.
Interview Signals for SDE1 Roles
Top Questions by Upvotes
Explain how ARC (Automatic Reference Counting) works in Swift/Objective-C. What is a retain cycle and how do you break one? Give an example using a delegate pattern and explain when to use weak vs unowned references.
Tell me about a time you had to make a decision with incomplete data. Meta values moving fast — how did you balance the need for speed against the risk of being wrong? What would you do differently today?
Implement a function that checks if a string of brackets is valid. Brackets: (), [], {}. Must handle nested brackets.
Given a stock price array, find the maximum profit you can make with at most two buy-sell transactions. Discuss the DP state and how it generalizes to k transactions.
Given a list of delivery time windows for N restaurants, find the maximum number of restaurants whose windows overlap at any point in time. Explain the sweep-line approach, time complexity, and how this maps to capacity planning for Swiggy's logistics team.
What is the difference between useEffect with no dependency array, empty array, and with dependencies?
What is the difference between controlled and uncontrolled components? When would you choose uncontrolled?
Explain the difference between a use case diagram and a user story. When would you use each?
Given a binary search tree, find the kth smallest element. Optimize for the case where this function is called many times on a static tree.
Given a list of intervals, merge all overlapping intervals and return the result. Explain the sort-then-scan approach and the edge cases (touching intervals, single interval, all disjoint).
Implement a LRU (Least Recently Used) cache with O(1) get and put operations. Explain the HashMap + doubly linked list approach and why a simple array or single HashMap is insufficient.
What is multithreading in Java? Explain synchronised keyword, wait/notify, and the difference between Thread and Runnable. Write a simple producer-consumer implementation using BlockingQueue.
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →