{
adam
coding
}
~/home
~/about
~/projects
~/blog
~/tracker
~/uses
~/contact
☀️
~/home
~/about
~/projects
~/blog
~/tracker
~/uses
~/contact
☀️
DSA Tracker
0%
Apr 07 →
Jul 20, 2026
on track
Week 15: Arrays & Hash Maps
| Phase 6: Fast Track — Core Patterns
Day 1-2: Arrays & Hash Maps
3-4 hours
📚 Learning
Brute-force: nested loops O(n²) — try every pair
Optimal: hash map O(n) — single pass lookup
Brute-force: sort + compare neighbours O(n log n) or nested O(n²)
Optimal: hash set O(n) — single pass
Brute-force: sort both strings O(n log n)
Optimal: Counter / frequency array O(n)
Brute-force: compare all pairs of strings O(n² · k)
Optimal: sorted-string key in hash map O(n · k log k)
Brute-force: count frequency + sort O(n log n)
Optimal: bucket sort O(n)
Brute-force: nested loop multiply all except self O(n²)
Optimal: prefix/suffix products O(n) no division
🔗 LeetCode
1. Two Sum
Easy
217. Contains Duplicate
Easy
242. Valid Anagram
Easy
49. Group Anagrams
Medium
347. Top K Frequent Elements
Medium
238. Product of Array Except Self
Medium
📝 Reflection / Notes:
Day 3-4: Two Pointers & Sliding Window
3-4 hours
📚 Learning
Brute-force: reverse + compare new string O(n) extra space
Optimal: two pointers inward O(n) O(1) space
Brute-force: triple nested loops O(n³)
Optimal: sort + two pointers O(n²), skip duplicates
Brute-force: check every pair of lines O(n²)
Optimal: two pointers from edges inward O(n)
Brute-force: check every buy-sell pair O(n²)
Optimal: track min price, single pass O(n)
Brute-force: check every substring O(n³)
Optimal: sliding window + set O(n)
🔗 LeetCode
125. Valid Palindrome
Easy
15. 3Sum
Medium
11. Container With Most Water
Medium
121. Best Time to Buy and Sell Stock
Easy
3. Longest Substring Without Repeating Characters
Medium
📝 Reflection / Notes:
Day 5-7: Stacks & Binary Search
3-4 hours
📚 Learning
Stack approach: push open, pop on close, check match O(n)
Brute-force: scan stack for min O(n) per getMin call
Optimal: auxiliary min-stack O(1) getMin
Optimal: binary search O(log n)
Brute-force: linear scan O(n)
Optimal: modified binary search on rotated array O(log n)
🔗 LeetCode
20. Valid Parentheses
Easy
155. Min Stack
Medium
704. Binary Search
Easy
33. Search in Rotated Sorted Array
Medium
📝 Reflection / Notes: