Back to Notes

Week 07 — Jul 6–12, 2026 — Graphs (BFS/DFS)

Week 07 (Jul 6 – Jul 12, 2026) — GRAPHS (BFS/DFS) (Sprint S3 of 8)

Heaviest DSA week (13). Timer on, solo, no peek till timer expires.

→ Curriculum: [[Coach/project_dsa_sd_curriculum]] | Coach state: [[synthesis/Coach Hub]]


Goals This Week

  • 13 DSA problems on time, solo
  • SD problem: URL Shortener (carried from S1) — base62, KGS, cache, hot-key
  • SD problem: Unique ID Generator in distributed systems — Snowflake (timestamp+machine+seq), UUID, ticket server, clock skew
  • Redis: Sorted sets (leaderboard, feed cache)
  • DDIA: Ch7 Sharding pt1
  • Sun Jul 12 scorecard + S4 direction

DSA Problem Set (13)

#ProblemLCDiffTargetSolved?TimeNotes
1Number of Islands200M20 min☐grid DFS/BFS flood fill
2Max Area of Island695M20 min☐
3Clone Graph133M25 min☐hashmap old→new
4Walls and Gates286M25 min☐multi-source BFS
5Rotting Oranges994M25 min☐multi-source BFS + time
6Pacific Atlantic Water Flow417M30 min☐reverse DFS from oceans
7Surrounded Regions130M30 min☐border DFS guard
8Course Schedule207M30 min☐cycle detect / topo
9Course Schedule II210M30 min☐topo order (Kahn)
10Graph Valid Tree261M25 min☐union-find / connected+no cycle
11Number of Connected Components323M25 min☐union-find
12Redundant Connection684M30 min☐union-find detect
13Word Ladder127H40 min☐BFS shortest transform

Score: __/13 on time


SD + Redis + DDIA

ItemStatusNotes
SD: URL Shortener⬜base62 encode, KGS vs counter vs hash, 301 vs 302, cache-aside, hot-key math, storage sizing
SD: Unique ID Generator (distributed)⬜Snowflake (41b time + 10b machine + 12b seq), UUID vs Snowflake, ticket server, clock-skew handling
Redis: sorted sets⬜ZADD/ZRANGE/ZREVRANGE; leaderboard + timeline cache
DDIA: Ch7 Sharding pt1⬜range vs hash partitioning; secondary indexes

Daily Plan (compact)

  • Mon: graph theory refresh + LC 200, 695
  • Tue: LC 133, 286, 994
  • Wed: LC 417, 130 + Redis sorted sets
  • Thu: LC 207, 210 + SD Feed high-level
  • Fri: LC 261, 323, 684 + DDIA Ch7.1
  • Sat: LC 127 (hard) + Twitter Feed whiteboard
  • Sun: retro + scorecard + create S4 tracker

Decision Gate (Sun Jul 12)

ScoreVerdictS4
10–13Pass strongAdv Graphs + Greedy + WhatsApp
7–9PatchyAdv Graphs + retry weak graphs
<7FailRepeat graphs core in S4

Hours Log

DayPlannedActual
Mon–Sun~26h

Retro (fill Sun)

  • Solved on time: __/13 | Weakest: __ | SD: __ | Redis: __ | DDIA: __ | S4 decision: __