Data Structures & Algorithms Flashcards
Every coding interview tests DSA. 35 must-know concepts from binary search to dynamic programming.
Start studying — completely free
SM-2 spaced repetition · 5 adaptive formats · any device
Sample cards
What is Big-O notation?
An asymptotic upper bound describing how an algorithm's running time or space grows relative to input size n as n grows large, ignoring constants and lower-order terms.
What do Θ (Theta) and Ω (Omega) notations mean?
Ω(g) is an asymptotic lower bound (best case growth). Θ(g) is a tight bound: the function grows exactly like g (both upper and lower). O(g) is the upper bound.
What is the time complexity of accessing an element by index in an array?
O(1). Arrays store elements in contiguous memory, so the address of index i is computed by base + i * elementSize, giving constant-time random access.
What is the average time complexity of hash map lookup, insert, and delete?
O(1) on average, assuming a good hash function and load factor. Worst case is O(n) when many keys collide into one bucket.
What two collision-resolution strategies do hash tables use?
Separate chaining (each bucket holds a linked list/structure of colliding entries) and open addressing (probe for the next free slot via linear, quadratic, or double hashing).
Showing 5 of 45 cards. See all →
Topics
Big O, hash tables, linked lists, BFS/DFS, BSTs, heaps, tries, quicksort, mergesort, DP, sliding window, two pointers, backtracking, union-find, topological sort.
Frequently asked questions
Better than grinding LeetCode?
This teaches concepts. LeetCode tests application. Use both — learn patterns here, practice on LeetCode.