Back to Tech Interviews
Data Structures & Algorithms (DSA) Interview Questions
Master essential coding interview patterns, algorithm analysis, Big-O complexities, and data structure implementations
Total: 31 QuestionsLearned: 0 / 31 (0%)
Difficulty Filters
Tools & Options
Showing 31 of 31 questions
Beginner
What is Big-O Notation, and how do you calculate Time and Space Complexity?
Beginner
How are Arrays stored in memory? What is the difference between Static and Dynamic Arrays?
Beginner
What is a Linked List? Compare Arrays vs Linked Lists and show how to Reverse a Linked List.
Beginner
Explain Stacks (LIFO) and Queues (FIFO). How do you solve the Valid Parentheses problem using a Stack?
Beginner
How does Binary Search work? What are its prerequisites and Time Complexity?
Beginner
Compare Insertion Sort, Selection Sort, and Bubble Sort. When is Insertion Sort preferred?
Intermediate
Explain the Two Pointers Pattern. How does it optimize Two Sum II (Sorted Array) from O(N^2) to O(N)?
Intermediate
What is the Sliding Window Pattern? Solve 'Maximum Sum Subarray of Size K' and 'Longest Substring Without Repeating Characters'.
Intermediate
Explain Kadane's Algorithm for Maximum Subarray Sum. What is its Time and Space Complexity?
Intermediate
How does Floyd's Cycle Detection Algorithm (Fast & Slow Pointers) detect a loop in a Linked List?
Intermediate
Design a Min Stack that supports push, pop, top, and getMin in O(1) time.
Intermediate
What is a Binary Search Tree (BST)? How do you validate if a Binary Tree is a valid BST?
Intermediate
Compare Tree Traversals: DFS (Preorder, Inorder, Postorder) vs BFS (Level-Order Traversal).
Intermediate
How do you find the Lowest Common Ancestor (LCA) of two nodes in a Binary Tree?
Intermediate
What is a Heap / Priority Queue? Explain Heapify and how to find the Kth Largest Element.
Intermediate
Compare Merge Sort vs Quick Sort in terms of Time, Space, and Stability.
Intermediate
Explain Graph Representations and Graph Traversals: BFS vs DFS.
Intermediate
What is a Trie (Prefix Tree)? Implement Insert, Search, and StartsWith operations.
Intermediate
Explain Bitwise Operations and Bit Tricks: Solve Single Number and Count Set Bits.
Advanced
Explain Dynamic Programming (DP) Principles: Memoization (Top-Down) vs Tabulation (Bottom-Up).
Advanced
Solve the 0/1 Knapsack Problem using Dynamic Programming.
Advanced
Explain the Longest Common Subsequence (LCS) Problem and its DP Solution.
Advanced
Solve the Coin Change Problem (Minimum Coins required for Amount) using DP.
Advanced
What is Topological Sort? Implement Kahn's Algorithm (BFS) for Dependency Scheduling.
Advanced
Explain Dijkstra's Algorithm for Shortest Path in Weighted Graphs.
Advanced
Explain Disjoint Set Union (DSU / Union-Find) with Path Compression and Union by Rank.
Advanced
What is a Monotonic Stack? Solve 'Next Greater Element' in O(N) time.
Scenario
Design an LRU (Least Recently Used) Cache with O(1) Get and Put operations.
Scenario
How do you find the Median in a Data Stream in O(log N) insert and O(1) findMedian?
Scenario
Solve the 3Sum Problem in O(N^2) Time using Sorting and Two Pointers.
Scenario
