Sector file // dsa
DATA STRUCTURES & ALGORITHMSDECODED.
Algorithms & data structures
Easy
8 questionsWhat is the prefix sum technique?
DSA · 1.2k views · dsa, prefix-sum, arrays
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 longest common prefix of an array of strings?
DSA · 742 views · dsa, strings
What is space complexity, and how much stack space does recursion use?
DSA · 738 views · dsa, complexity, recursion
How do you invert a binary tree?
DSA · 533 views · dsa, binary-tree, recursion
How should you approach a DSA problem in a coding interview?
DSA · 526 views · dsa, interview-strategy, problem-solving
How do you check if a string is a valid palindrome?
DSA · 459 views · dsa, two-pointers, strings
Medium
13 questionsHow do you generate all subsets of an array?
DSA · 962 views · dsa, backtracking, recursion
How do you solve the Combination Sum problem?
DSA · 907 views · dsa, backtracking
How do you find the next greater element for every item (Daily Temperatures)?
DSA · 885 views · dsa, monotonic-stack, arrays
Find the kth largest element in an array
DSA · Amazon · 808 views · dsa, heap, arrays
How do you generate all permutations of an array?
DSA · 800 views · dsa, backtracking, recursion
How do you search a sorted 2D matrix?
DSA · 693 views · dsa, binary-search, matrix
How do you solve the Gas Station problem?
DSA · 380 views · dsa, greedy, arrays
How do merge sort and quicksort work?
DSA · 323 views · dsa, sorting, divide-and-conquer
Hard
7 questionsHow does the KMP string-matching algorithm work?
DSA · 1.2k views · dsa, strings, pattern-matching
How does the Floyd-Warshall algorithm work?
DSA · 897 views · dsa, graph, shortest-path
How do you find the largest rectangle in a histogram?
DSA · 727 views · dsa, monotonic-stack, arrays
What is a segment tree and when do you need one?
DSA · 631 views · dsa, segment-tree, range-query
How do you solve the N-Queens problem?
DSA · 563 views · dsa, backtracking
How do you find strongly connected components in a directed graph?
DSA · 435 views · dsa, graph, scc
What is bitmask dynamic programming?
DSA · 384 views · dsa, dynamic-programming, bitmask
Seen a Data Structures & Algorithms question that is not here? Add it and help the next candidate.
Share a question