Sector file // dsa
DATA STRUCTURES & ALGORITHMSDECODED.
Algorithms & data structures
Easy
10 questionsHow do you reverse a linked list?
DSA Β· 1.2k views Β· linked-list
What is the difference between a stack and a queue?
DSA Β· 918 views Β· stack, queue
How do you merge two sorted linked lists?
DSA Β· 839 views Β· linked-list
What is space complexity, and how much stack space does recursion use?
DSA Β· 738 views Β· dsa, complexity, recursion
How do you check for valid/balanced parentheses?
DSA Β· 690 views Β· stack, parentheses
What is recursion and what is a base case?
DSA Β· 682 views Β· recursion
How do you compute the GCD of two numbers?
DSA Β· 672 views Β· math, gcd
How do you check if a root-to-leaf path sums to a target?
DSA Β· 609 views Β· trees, recursion
Medium
16 questionsHow do you add two numbers stored as linked lists?
DSA Β· 1.1k views Β· linked-list, math
How do you implement a queue using two stacks?
DSA Β· 1.1k views Β· stack, queue
How do you check if a binary tree is balanced?
DSA Β· 1.1k views Β· trees, balanced
How do you find the next greater element for every item (Daily Temperatures)?
DSA Β· 885 views Β· dsa, monotonic-stack, arrays
How do you validate that a binary tree is a BST?
DSA Β· 844 views Β· trees, bst
What is a monotonic stack and when do you use it?
DSA Β· 786 views Β· stack, monotonic
How do you count connected components in an undirected graph?
DSA Β· 717 views Β· graphs, union-find, dfs
How do you find the kth smallest element in a BST?
DSA Β· 700 views Β· trees, bst, inorder
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
How do you find strongly connected components in a directed graph?
DSA Β· 435 views Β· dsa, graph, scc
Seen a Data Structures & Algorithms question that is not here? Add it and help the next candidate.
Share a question