Sector file // dsa
DATA STRUCTURES & ALGORITHMSDECODED.
Algorithms & data structures
Easy
12 questionsWhat is the prefix sum technique?
DSA ยท 1.2k views ยท dsa, prefix-sum, arrays
What is the difference between an array and a linked list?
DSA ยท 1.1k views ยท arrays, linked-list
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
How do you add one to a number represented as a digit array?
DSA ยท 787 views ยท arrays, math
What is the time complexity of common operations on arrays, hash maps, and balanced trees?
DSA ยท 753 views ยท complexity
How do you move all zeroes to the end of an array in place?
DSA ยท 691 views ยท arrays, two-pointers
How do you find the single number where every other element appears twice?
DSA ยท 331 views ยท arrays, bit-manipulation
Medium
18 questionsHow does Quickselect find the kth smallest/largest element?
DSA ยท 1.1k views ยท quickselect, arrays
How do you search in a rotated sorted array?
DSA ยท 891 views ยท binary-search, arrays
How do you find the next greater element for every item (Daily Temperatures)?
DSA ยท 885 views ยท dsa, monotonic-stack, arrays
How do you rotate an array by k positions?
DSA ยท 881 views ยท arrays, rotation
How do you sort an array of 0s, 1s, and 2s?
DSA ยท 826 views ยท arrays, sorting, dutch-flag
How do you find the maximum subarray sum?
DSA ยท 819 views ยท kadane, dp
Find the kth largest element in an array
DSA ยท Amazon ยท 808 views ยท dsa, heap, arrays
How do you find the maximum product subarray?
DSA ยท 497 views ยท dp, arrays
Hard
3 questionsHow do you solve the trapping rain water problem?
DSA ยท 818 views ยท arrays, two-pointers
How do you find the largest rectangle in a histogram?
DSA ยท 727 views ยท dsa, monotonic-stack, arrays
Median of two sorted arrays in O(log(min(m,n))) โ how does the partition trick work?
DSA ยท 303 views ยท binary search, array, Amazon
Seen a Data Structures & Algorithms question that is not here? Add it and help the next candidate.
Share a question