--- title: "Software Engineer Interview Questions: 50+ Coding Questions (2026)" description: "Comprehensive list of software engineer interview questions with solutions. Covers coding, system design, behavioral, and technical questions asked at FAANG and top tech companies." canonical: "https://mortit.com/blog/software-engineer-interview-questions" --- Interview Prep # Software Engineer Interview Questions 50+ questions asked at Google, Meta, Amazon, and top startups-with approaches for solving each type. 20 min read Updated February 2026 TL;DR SWE interviews test four areas: **Coding** (algorithms, data structures),**System Design** (architecture, scalability), **Behavioral** (teamwork, communication), and **Technical Deep Dive** (past projects). Practice 100-150 problems, learn to think out loud, and study system design fundamentals. The best candidates communicate their reasoning clearly-not just write correct code. ## The Four Types of SWE Interview Questions Understanding what each round tests helps you prepare efficiently. | Type | What It Tests | Time | | --- | --- | --- | | **Coding** | Problem-solving, data structures, algorithms | 45-60 min | | **System Design** | Architecture, scalability, trade-offs | 45-60 min | | **Behavioral** | Teamwork, communication, culture fit | 30-45 min | | **Technical Deep Dive** | Past experience, technical decisions | 30-45 min | If you're interviewing for a role that spans both the browser and the server, expect questions that blend all four types across the stack - see our [full-stack developer interview questions](https://mortit.com/blog/full-stack-developer-interview-questions) guide for how that round typically differs from a specialist track. ## Coding Questions: Arrays & Strings The most common category. Master these patterns and you'll handle most interview problems. 1. **Two Sum:** Find two numbers that add up to a target. (Hash map approach) 2. **Best Time to Buy and Sell Stock:** Find max profit from one transaction. 3. **Contains Duplicate:** Check if array has any duplicates. 4. **Product of Array Except Self:** Calculate products without division. 5. **Maximum Subarray:** Find contiguous subarray with largest sum. (Kadane's algorithm) 6. **3Sum:** Find all unique triplets that sum to zero. 7. **Container With Most Water:** Find two lines that hold the most water. 8. **Longest Substring Without Repeating Characters:** Sliding window classic. 9. **Valid Anagram:** Check if two strings are anagrams. 10. **Group Anagrams:** Group strings that are anagrams of each other. #### Pattern: Two Pointers Use when: Searching for pairs in a sorted array, or when you need to compare elements from both ends. **Example:** Two Sum II (sorted array) - Start pointers at both ends. If sum is too small, move left pointer right. If too big, move right pointer left. **Time:** O(n) | **Space:** O(1) ## Coding Questions: Trees & Graphs These questions test your ability to think recursively and traverse complex data structures. ### Binary Trees 11. **Maximum Depth of Binary Tree:** Find the height of a tree. 12. **Invert Binary Tree:** Swap left and right children recursively. 13. **Same Tree:** Check if two trees are identical. 14. **Binary Tree Level Order Traversal:** BFS to get nodes level by level. 15. **Validate Binary Search Tree:** Check BST property holds. 16. **Lowest Common Ancestor:** Find LCA of two nodes. 17. **Serialize and Deserialize Binary Tree:** Convert tree to string and back. ### Graphs 18. **Number of Islands:** Count connected components in a grid. 19. **Clone Graph:** Deep copy a graph with cycles. 20. **Course Schedule:** Detect cycle in directed graph (topological sort). 21. **Pacific Atlantic Water Flow:** Multi-source BFS/DFS. 22. **Word Ladder:** BFS to find shortest transformation sequence. 23. **Network Delay Time:** Dijkstra's shortest path algorithm. #### Pattern: BFS vs DFS **Use BFS when:** Finding shortest path, level-order traversal, nearest neighbor. **Use DFS when:** Exploring all paths, detecting cycles, topological sort, backtracking. Both are O(V + E) for graphs, O(n) for trees. ## Coding Questions: Dynamic Programming DP questions are often the hardest. The key is recognizing the pattern and defining the subproblem correctly. 24. **Climbing Stairs:** Classic Fibonacci-style DP. 25. **House Robber:** Max sum of non-adjacent elements. 26. **Coin Change:** Minimum coins to make a target amount. 27. **Longest Increasing Subsequence:** O(n²) DP or O(n log n) with binary search. 28. **Longest Common Subsequence:** 2D DP classic. 29. **Word Break:** Check if string can be segmented into dictionary words. 30. **Unique Paths:** Count paths in a grid (combinatorics or DP). 31. **Edit Distance:** Minimum operations to convert one string to another. 32. **Decode Ways:** Count ways to decode a numeric string. #### DP Approach Framework **1\. Define the subproblem:** What does dp\[i\] represent? **2\. Find the recurrence:** How does dp\[i\] relate to smaller subproblems? **3\. Identify base cases:** What are dp\[0\], dp\[1\]? **4\. Determine order:** Bottom-up or top-down (memoization)? **5\. Optimize space:** Can you reduce from O(n) to O(1)? ## Coding Questions: Other Essential Topics ### Linked Lists 33. **Reverse Linked List:** Iterative and recursive approaches. 34. **Merge Two Sorted Lists:** Combine into one sorted list. 35. **Linked List Cycle:** Detect cycle using Floyd's algorithm. 36. **Remove Nth Node From End:** Two-pointer technique. 37. **Merge K Sorted Lists:** Heap or divide-and-conquer. ### Stacks & Queues 38. **Valid Parentheses:** Match brackets using a stack. 39. **Min Stack:** Stack with O(1) getMin operation. 40. **Daily Temperatures:** Monotonic stack classic. 41. **Implement Queue using Stacks:** Amortized O(1) operations. ### Binary Search 42. **Search in Rotated Sorted Array:** Modified binary search. 43. **Find Minimum in Rotated Sorted Array:** Binary search variation. 44. **Search a 2D Matrix:** Treat matrix as sorted array. 45. **Median of Two Sorted Arrays:** Hard binary search problem. ### Heap / Priority Queue 46. **Kth Largest Element:** Quick select or min-heap. 47. **Top K Frequent Elements:** Heap or bucket sort. 48. **Find Median from Data Stream:** Two heaps approach. ## System Design Questions For senior roles (3+ years), expect at least one system design round. These test your ability to design scalable, reliable systems. 49. **Design a URL Shortener (like bit.ly)** 50. **Design Twitter/X Feed** 51. **Design a Chat System (like WhatsApp)** 52. **Design a Video Streaming Service (like YouTube)** 53. **Design a Ride-Sharing Service (like Uber)** 54. **Design a Web Crawler** 55. **Design a Rate Limiter** 56. **Design a Key-Value Store** #### System Design Framework **1\. Clarify requirements (5 min):** Users, scale, features, constraints **2\. Estimate scale (5 min):** QPS, storage, bandwidth **3\. High-level design (10 min):** Main components, data flow **4\. Deep dive (20 min):** Database schema, API design, specific components **5\. Address bottlenecks (5 min):** Caching, sharding, replication ## Behavioral Questions for Engineers Don't underestimate these. Many strong coders fail because they can't articulate their experience. Use [the STAR method](https://mortit.com/blog/behavioral-interview-questions). 57. **Tell me about a challenging bug you solved.** 58. **Describe a time you disagreed with a technical decision.** 59. **Tell me about a project you're proud of.** 60. **How do you handle tight deadlines?** 61. **Describe a time you had to learn a new technology quickly.** 62. **Tell me about a time you improved a process or system.** 63. **How do you handle code reviews-giving and receiving feedback?** 64. **Describe a situation where you had to work with a difficult teammate.** ## How to Practice Effectively Solving problems is only half the battle. You need to practice explaining your thinking out loud. - **Time yourself:** Medium problems in 25-30 min, Hard in 40-45 min - **Explain out loud:** Talk through your approach even when practicing alone - **Review solutions:** Even if you solve it, study optimal approaches - **Learn patterns:** Most problems are variations of common patterns - **Do mock interviews:** Practice with real interview pressure LeetCode builds problem-solving skills, but it doesn't help with the communication part-explaining your approach while you code. That's where mock interviews make the difference. [MORT's technical interview practice](https://mortit.com/features/interview-practice) simulates the real experience, including follow-up questions based on your approach. ## Company-Specific Tips - **Google:** Heavy on algorithms. Expect 2-3 coding rounds. They value optimal solutions. - **Meta:** Fast-paced coding rounds (2 problems in 45 min). Strong system design focus. - **Amazon:** Leadership principles in every round. Prepare stories for each one. - **Apple:** Domain-specific questions based on the team. More collaborative coding. - **Microsoft:** Mix of coding and design. More conversational style. - **Startups:** Often include take-home assignments. Focus on practical skills. ## Practice technical interviews with AI MORT's Interview Practice simulates coding interviews with real-time feedback on your problem-solving approach and communication. Practice explaining your thinking-not just writing code. [Learn About Interview Practice](https://mortit.com/features/interview-practice) [Try a Free Mock Interview](https://app.mortit.com/signup) ## More Interview Resources ### [Technical Interview Guide](https://mortit.com/blog/technical-interview-preparation-guide) Complete preparation strategy for engineers ### [Software Engineer Resume Example](https://mortit.com/blog/software-engineer-resume-example) Technical skills, projects, and impact-driven bullets ### [Complete Interview Prep Guide](https://mortit.com/blog/interview-preparation-guide) Everything you need from research to follow-up