Sector file // dsa
DATA STRUCTURES & ALGORITHMSDECODED.
Algorithms & data structures
Easy
31 questionsHow do you reverse a linked list?
DSA · 1.2k views · linked-list
How does binary search work and what are its requirements?
DSA · 1.1k views · binary-search
How do you solve the climbing stairs problem?
DSA · 1.1k views · dp, climbing-stairs
What is the fast and slow pointer technique?
DSA · 948 views · dsa, linked-list, two-pointers
What is a graph, and how do you represent it?
DSA · 921 views · dsa, graph, adjacency-list
How do you find the intersection node of two linked lists?
DSA · 877 views · linked-list, two-pointers
How do you find the missing number in 0..n?
DSA · 871 views · arrays, math
How do you find the best time to buy and sell a stock?
DSA · 865 views · arrays, greedy
Medium
63 questionsWhat is topological sort and when is it used?
DSA · 1.2k views · graphs, topological-sort
What is dynamic programming?
DSA · 1.2k views · dynamic-programming
How do you find the lowest common ancestor in a binary tree?
DSA · 1.1k views · trees, lca
How do you find the k closest points to the origin?
DSA · 1.1k views · heap, geometry
How do you solve the 0/1 knapsack problem?
DSA · 1.1k views · dp, knapsack
How do you solve the course schedule (prerequisites) problem?
DSA · 1.1k views · graphs, topological-sort
How does Quickselect find the kth smallest/largest element?
DSA · 1.1k views · quickselect, arrays
How do you check if a binary tree is balanced?
DSA · 1.1k views · trees, balanced
Hard
17 questionsSliding window median: how do you maintain median with two heaps as the window slides?
DSA · 1.2k views · heap, sliding window, Meta
How does the KMP string-matching algorithm work?
DSA · 1.2k views · dsa, strings, pattern-matching
How do you merge k sorted lists?
DSA · 1.1k views · heap, linked-list
How does the Floyd-Warshall algorithm work?
DSA · 897 views · dsa, graph, shortest-path
How do you serialize and deserialize a binary tree?
DSA · 870 views · trees, serialization
Count of smaller numbers after self with Fenwick tree — how to coordinate compress?
DSA · 855 views · fenwick, binary indexed, Amazon
How does the Bellman-Ford algorithm work?
DSA · 844 views · graphs, shortest-path
How do you solve the trapping rain water problem?
DSA · 818 views · arrays, two-pointers
Seen a Data Structures & Algorithms question that is not here? Add it and help the next candidate.
Share a question