Compiled the following list of patterns and examples from ChatGPT for quick reference in the future.
Pattern
Best
Avg
Worst
Space
Two Pointers
O(n)
O(n)
O(n)
O(1)
Sliding Window
O(n)
O(n)
O(n)
O(1)/O(k)
Fast & Slow Pointers
O(n)
O(n)
O(n)
O(1)
Merge Intervals
—
O(n log n)
O(n log n)
O(n)
Cyclic Sort
O(n)
O(n)
O(n)
O(1)
Binary...
🛡️ VERIFIED CYBER INTELLIGENCE ID: #2952265