Sector file // dsa
DATA STRUCTURES & ALGORITHMSDECODED.
Algorithms & data structures
Easy
5 questionsWhat is the difference between a stack and a queue?
DSA ยท 918 views ยท stack, queue
How do you find the best time to buy and sell a stock?
DSA ยท 865 views ยท arrays, greedy
How do you merge two sorted linked lists?
DSA ยท 839 views ยท linked-list
What is a stable sorting algorithm?
DSA ยท 485 views ยท stability, sorting
How do you merge two sorted arrays?
DSA ยท 317 views ยท sorting, merge
Medium
14 questionsWhat is topological sort and when is it used?
DSA ยท 1.2k views ยท graphs, topological-sort
How do you find the k closest points to the origin?
DSA ยท 1.1k views ยท heap, geometry
How does Quickselect find the kth smallest/largest element?
DSA ยท 1.1k views ยท quickselect, arrays
Find the kth largest element in an array
DSA ยท Amazon ยท 808 views ยท dsa, heap, arrays
What is a monotonic stack and when do you use it?
DSA ยท 786 views ยท stack, monotonic
What is a heap / priority queue?
DSA ยท 711 views ยท heap, priority-queue
When would you use BFS over Dijkstra for shortest paths?
DSA ยท 647 views ยท graphs, shortest-path
How do you find the minimum number of meeting rooms required?
DSA ยท 381 views ยท intervals, sorting, heap
Hard
7 questionsSliding window median: how do you maintain median with two heaps as the window slides?
DSA ยท 1.2k views ยท heap, sliding window, Meta
How do you merge k sorted lists?
DSA ยท 1.1k views ยท heap, linked-list
What is the difference between Kruskal's and Prim's MST algorithms?
DSA ยท 696 views ยท graphs, mst
Design an LRU Cache with O(1) get and put โ why doubly linked list + hash map?
DSA ยท 449 views ยท lru, hash map, Amazon
How do you find the median from a data stream?
DSA ยท 240 views ยท heap, design
How does Dijkstra's algorithm work?
DSA ยท 223 views ยท graphs, shortest-path
Design Twitter feed: how do you fan-out with heap + hash for timeline?
DSA ยท 133 views ยท system design, heap, Meta
Seen a Data Structures & Algorithms question that is not here? Add it and help the next candidate.
Share a question