Week 6 — Modern JS & Stacks

intermediate javascript dsa dbms

Goal: Finish JavaScript (all 43 topics!) and start stack/queue data structures. This is a big milestone — celebrate it.

Topics

DayFocusTopics
MonJS Modules & ModernModules · Optional Chaining & Nullish Coalescing · Symbols
TueJS MetaprogrammingProxy & Reflect · Output-Based Questions
WedJS Patterns & PolyfillsPolyfills · Design Patterns
ThuDSA StacksStacks · Monotonic Stack · Queues & Deques
FriDSA Heaps & DBMSPriority Queues & Heaps · Database Migrations

Key Concepts

  • ES modules (import/export) vs CommonJS (require/module.exports) — know the differences and when each is used
  • Proxy for metaprogramming — intercept property access, validation, logging, and more
  • Polyfill writing pattern: check if the method exists, define it on the prototype if not
  • Stack LIFO pattern — used in parsing, backtracking, undo systems, and browser history
  • Monotonic stack for “next greater element” type problems — a pattern that shows up a lot
  • Heap (priority queue) for top-K problems, merge K sorted lists, median finding
  • Database migrations as version control for your schema — up/down, idempotent, safe rollbacks

Practice

  • Write polyfills for Promise.all and Array.prototype.flat — understand every edge case
  • Implement a min-heap with insert, extractMin, and peek operations
  • Solve “next greater element” using a monotonic stack
  • Go through 5 output-based JS questions and predict the answer before running them

~12 topics · ~2 hrs/day · Focus: read the linked notes, then code each concept