0% found this document useful (0 votes)
4 views25 pages

200+ SDE Interview Questions

This document is a comprehensive guide for preparing for Software Development Engineer (SDE) interviews, covering over 200 questions across various topics including Data Structures & Algorithms, System Design, and Behavioral questions. It includes detailed sections on specific problem types such as Arrays, Strings, Trees, Graphs, and Dynamic Programming, along with strategies for interview success. The guide emphasizes practice, time management, and effective communication during interviews.

Uploaded by

Peri
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views25 pages

200+ SDE Interview Questions

This document is a comprehensive guide for preparing for Software Development Engineer (SDE) interviews, covering over 200 questions across various topics including Data Structures & Algorithms, System Design, and Behavioral questions. It includes detailed sections on specific problem types such as Arrays, Strings, Trees, Graphs, and Dynamic Programming, along with strategies for interview success. The guide emphasizes practice, time management, and effective communication during interviews.

Uploaded by

Peri
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

200+ SDE Interview Questions

Master System Design, DSA & Behavioral

Comprehensive Interview Preparation Guide


Interview Topics Covered
• Data Structures & Algorithms (DSA) – Arrays, Strings, Linked Lists, Trees, Graphs, Dynamic Programming
• System Design – Scalable architectures, distributed systems, real-world problem solving
• Behavioral – Leadership principles, problem-solving approach, team collaboration
• Advanced Topics – Heaps, Greedy algorithms, Math, Bit manipulation, Geometry
Arrays & Strings - Part 1
• Two Sum variants (indices, count pairs, unique pairs)
• Best Time to Buy and Sell Stock (I/II/with cooldown/with fee)
• Product of Array Except Self (zeros & negatives)
• Longest Substring Without Repeating Characters
• Minimum Window Substring
• Longest Palindromic Substring
• Valid Anagram / Group Anagrams
• Merge Intervals / Insert Interval
Arrays & Strings - Part 2
• Subarray Sum Equals K (positive & mixed)
• Maximum Subarray (Kadane) + circular variant
• Container With Most Water
• Trapping Rain Water (two pointers & stack)
• 3Sum / 4Sum / 3Sum Closest
• Word Break (I/II) – DP vs Trie
• Valid Parentheses / Minimum Add to Make Valid
• Sliding Window Maximum (deque)
Arrays & Strings - Part 3
• Search in Rotated Sorted Array (I/II)
• Longest Consecutive Sequence
• Set Matrix Zeroes (in-place)
• Spiral Matrix (I/II)
• Rotate Image (in-place 2D transform)
• Word Search (board backtracking)
• Distinct Subsequences (count ways)
Hash / Stack / Queue - Part 1
• LRU Cache (design) – hashmap + doubly linked list
• LFU Cache (design) – freq lists
• Min Stack / Max Stack (getMin in O(1))
• Evaluate Reverse Polish Notation
• Basic Calculator I/II/III (parentheses, precedence)
• Next Greater Element (I/II) – monotonic stack
• Daily Temperatures – monotonic stack
• Queue using Stacks / Stack using Queues
Hash / Stack / Queue - Part 2
• Implement Circular Queue / Deque
• Design Hit Counter / Rate Limiter
• Design Browser History (two stacks)
• Decode String (k[encoded])
• Remove K Digits to form smallest number
• Asteroid Collision (stack)
• Largest Rectangle in Histogram
• Maximal Rectangle in Binary Matrix
Linked Lists Problems
• Reverse Linked List (I/II partial groups of k)
• Merge Two Sorted Lists / Merge K Sorted Lists (heap)
• Add Two Numbers (forward & reverse order)
• Remove Nth Node From End
• Reorder List / Odd Even Linked List
• Linked List Cycle (detect & entry point)
• Copy List with Random Pointer
• Partition List by value
• Sort List (merge sort on list)
• Rotate List / Swap Nodes in Pairs
Trees & BST - Part 1
• Binary Tree Traversals (Inorder/Preorder/Postorder)
• Level Order Traversal / Zigzag Level Order
• Diameter of Binary Tree
• Balanced Binary Tree / Height Balanced Check
• Maximum Depth / Minimum Depth of Binary Tree
• Path Sum I/II/III (count paths)
• Lowest Common Ancestor (Binary Tree & BST)
• Serialize and Deserialize Binary Tree (design)
Trees & BST - Part 2
• Construct Tree from Preorder & Inorder / Postorder
• Binary Tree Right Side View / Left View
• Flatten Binary Tree to Linked List
• Validate Binary Search Tree (bounds)
• Kth Smallest / Largest in BST
• Convert Sorted Array/List to BST
• Inorder Successor/Predecessor in BST
• Range Sum of BST / Trim BST
• Recover Binary Search Tree (swap fix)
Graphs - Part 1
• Number of Islands (DFS/BFS/Union-Find)
• Clone Graph (BFS/DFS)
• Course Schedule I/II (topological sort)
• Alien Dictionary (topo + lexicographic constraints)
• Word Ladder I/II (BFS + heuristics)
• Pacific Atlantic Water Flow / Surrounded Regions
• Walls and Gates / Rotting Oranges
• Shortest Path in Binary Matrix / Maze solver
Graphs - Part 2
• Network Delay Time (Dijkstra)
• Cheapest Flights Within K Stops (Bellman-Ford/DP)
• Reconstruct Itinerary (Hierholzer / Eulerian path)
• Redundant Connection (Union-Find)
• Graph Valid Tree / Count Components
• Kruskal / Prim Minimum Spanning Tree (design question)
• Evaluate Division (graph with weights)
• Accounts Merge (Union-Find)
• Critical Connections (Tarjan bridges)
Searching & Sorting Problems
• Quickselect (Kth Largest Element)
• Top K Frequent Elements (heap/bucket)
• Sort Colors (DNF) / 3-way partition
• Merge K Sorted Arrays (heap) / external sort idea
• Search a 2D Matrix (I/II)
• Find Peak Element / Mountain Array peak
• Median of Two Sorted Arrays (binary search on partitions)
• H-Index / H-Index II
• Find Duplicate Number (Floyd vs binary search on answer)
Heaps & Greedy - Part 1
• Meeting Rooms II (min-heap)
• Task Scheduler (cooldown) – greedy + heap
• Reorganize String / Rearrange String k Distance Apart
• IPO / Maximize Capital (two heaps)
• Hand of Straights / Divide Array in Sets of K
• Boats to Save People / Assign Cookies
• Gas Station (greedy proof)
• Jump Game I/II (greedy farthest reach)
Heaps & Greedy - Part 2
• Partition Labels
• Minimum Number of Arrows to Burst Balloons
• Non-overlapping Intervals (erase minimum)
• Candy (two-pass greedy)
• Lemonade Change
• Split Array Largest Sum (binary search + greedy check)
• Minimum Cost to Connect Sticks (heap)
Dynamic Programming - Part 1
• Climbing Stairs / Min Cost Climbing Stairs
• House Robber I/II/III
• Coin Change (min coins, count combinations)
• Longest Increasing Subsequence (O(n log n))
• Edit Distance (Levenshtein)
• Decode Ways I/II
• Unique Paths I/II (with obstacles)
• Partition Equal Subset Sum / Target Sum
Dynamic Programming - Part 2
• Burst Balloons (interval DP)
• Palindromic Substrings / Longest Palindromic Subsequence
• Regular Expression Matching / Wildcard Matching
• Best Time to Buy/Sell Stock with K transactions
• Word Break DP (count ways vs boolean)
• Interleaving String
• Scramble String
• Matrix Chain Multiplication / Minimum Score Triangulation
• Paint House I/II (with k colors)
• Knapsack 0/1 & Unbounded variants (pattern)
Math / Bit / Geometry Problems
• Reverse Bits / Number of 1 Bits
• Single Number I/II/III (bitwise)
• Missing Number / Find All Missing / Duplicates
• Power of Two/Three/Four / Fast Pow (binary exponentiation)
• Count Primes / Sieve of Eratosthenes
• Greatest Common Divisor / Euclid / LCM problems
• Happy Number / Ugly Number / Super Ugly Number
• Rectangle Overlap / Line Sweep basics
• Random Pick with Weight / Reservoir Sampling
• Kth Smallest in Multiplication Table (binary search on answer)
System Design - Part 1
• Design a URL Shortener
• Design a News Feed / Timeline
• Design a Rate Limiter (per user/IP) – token bucket
• Design a Key-Value Store (caching + persistence)
• Design an E-commerce Cart & Checkout
• Design a Messaging/Chat System (WhatsApp-lite)
• Design a File Storage Service (Dropbox/Google Drive)
• Design a Web Crawler
System Design - Part 2
• Design a Ride-Hailing/Dispatch System
• Design a Logging & Metrics System
• Design a Notification Service (email/SMS/push)
• Design a Payment System (idempotency, retries)
• Design a Search Autocomplete
• Design a Video Streaming Platform (Netflix-lite)
• Design a Pastebin
• Design a Social Graph (follow/unfollow, recommendations)
• Design a Leaderboard (time-decay, top-N)
System Design - Part 3
• Design a Distributed Job Queue
• Design a Real-time Analytics Pipeline
• Design a Feature Flag Service
Behavioral Questions - Part 1
• Tell me about a time you owned an ambiguous problem end-to-end (Ownership)
• Describe a situation you disagreed with a senior engineer and what happened (Disagree & Commit)
• Tell me about a time you improved performance or reduced cost (Deliver Results)
• Give an example when you prioritized customer needs over engineering preferences (Customer Obsession)
• Tell me about a production incident you handled—root cause and prevention (Dive Deep)
Behavioral Questions - Part 2
• Describe a time you moved fast with incomplete information (Bias for Action)
• Tell me about mentoring a teammate and the impact (Hire/Develop the Best)
• Describe a time you simplified a complex system or process (Invent & Simplify)
• Tell me about a failure—what did you learn and change? (Learn & Be Curious)
• How do you handle conflicting deadlines across teams? (Earn Trust)
Interview Success Strategy
• DSA Mastery: Practice 30-40 problems from each category to identify patterns
• System Design: Focus on scalability, availability, consistency trade-offs
• Behavioral: Use STAR method—Situation, Task, Action, Result
• Time Management: Allocate 40-45 min for algorithm problems, 35-40 min for system design
• Code Quality: Write clean, well-commented code with edge case handling
• Communication: Talk through your thought process, ask clarifying questions
Ready to Ace Your Interview?
Master these 200+ questions and you'll be prepared for any SDE role

You might also like