Week 5 Cold Revisit

This Friday, before any new work, re-solve two prior problems cold: no notes, no prior code open, no AI, the standard 25-minute struggle floor on each. The first solve taught the pattern; this blind re-solve is what makes it stick.

The two problems

  1. Top K Frequent Elements (Week 1, Arrays and Hashing). https://leetcode.com/problems/top-k-frequent-elements/
  2. Daily Temperatures (Week 4, Stacks). https://leetcode.com/problems/daily-temperatures/

How to run the revisit

  • Do not look up which pattern either problem belongs to. Recognizing it cold, from the problem statement alone, is the entire point of the exercise; the tutor will not tell you.
  • Start each from a blank file. Name the pattern aloud, write the plain-English approach as a comment, then code.
  • Apply the 25-minute floor to each independently. If you stall past the floor, use the hint ladder, one rung per ask.
  • Submit each to LeetCode’s judge. The judge is the oracle, not the tutor.
  • Debrief each with the five questions in your commit message, and log the outcome in .tutor/revisit-log.md.

Neither problem is binary search, and that is deliberate. The cold revisit trains recognition across the whole course, so the muscle you build is “read a cold statement and feel the pattern”, not “apply this week’s pattern again”. There is a specific trap to notice: both problems can sound like binary search if you squint. Top K Frequent says “k largest”, which tempts a sorted-order reach, but it is really counting plus bucket sort in O(n) (no sorted array, no monotonic predicate). Daily Temperatures asks “how far to the next warmer day”, which is a next-greater-element question answered by a monotonic stack in O(n), not by searching an ordered space. Catching yourself almost reaching for this week’s pattern, and then correctly rejecting it, is the recognition skill the revisit is built to train. If either one comes back slower than you expect, that is the signal for where to spend your next stretch session.