Day 2 · Friday, Oct 30, 2026 · 4h

Graphs + Java fundamentals

dsagraphsbfsdfsjavajvmcollectionsgcconcurrency

Focus areas: DSA (3 hrs) and Java fundamentals (1 hr).

DSA: graphs (3 hrs)

  • Map of Highest Peak: multi-source BFS from every water cell at height 0; each BFS layer is one higher.
  • Surrounded Regions: flip the problem around. DFS/BFS from every border O to mark the safe cells, then capture every O that wasn’t marked.
  • Snakes and Ladders: BFS for the fewest dice rolls, where each square has up to 6 edges. The tricky part is converting a square number to a row/column on the boustrophedon board.

Java basics (1 hr)

  • JVM: class loading, runtime memory areas (heap, stack, metaspace), bytecode and the JIT.
  • Collections: List / Set / Map / Queue and their main implementations.
  • Garbage collection: basics of generational GC.
  • Concurrency: basics of threads and synchronization.

Pattern of the day

Two of the three graph problems start BFS/DFS from the boundary (water cells, border cells) instead of from each cell, which turns repeated searches into one pass.