Skip to content
Guest
← All References
DSA Language-Agnostic

DSA & Big-O Quick Reference

Essential Big-O complexities, data structure trade-offs, and core interview problem-solving patterns.

O(1) < O(log n) < O(n) < O(n log n) < O(n^2)

Pattern Cheat Sheet

Problem ClueGo-To PatternTypical Time
Find complement / duplicatesHash Map / Hash SetO(n)
Sorted array pair or palindromeTwo PointersO(n)
Nested brackets / undo historyLIFO StackO(n)
Sorted search or monotonic answerBinary SearchO(log n)
Shortest unweighted path / levelsBFS (Queue)O(V + E)
Overlapping recursive subproblemsDynamic ProgrammingO(n) – O(n^2)

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind