TOUGH TONGUE AI
  • Home
    LogoTOUGH TONGUE AI

    RESOURCES

    Loading...

    HomeLibraryPractical Mock · Make a Slow Service Fast

    Practical Mock · Make a Slow Service Fast

    Practical Mock · Make a Slow Service Fast

    Overview

    Speed up a correct but slow report in a shared editor. Measure first, fix it without changing the output, and pass a one-second test. Report after.

    Your Instructions

    Your goal: find where a correct service spends its time, make it fast, and prove the output did not change.

    How this works (about 30 minutes)

    • Theo shares a small service in the shared editor and says it is too slow on a real feed.
    • Ask Theo for numbers: sizes, timings, what the profile shows. He gives one line at a time.
    • Measure, explain the cost in words, change the code, and run the public tests from the editor. The last one is a one-second time limit on a large feed.
    • A production question about your change.
    • No hints on purpose, a few if you are stuck. Your report comes after.

    What scores well

    • Measuring before changing anything, and saying what you expect to see
    • Naming the repeated work and its cost as the input grows
    • A structure built once instead of a scan per call, and the price in memory
    • Identical output, checked, not assumed
    • Stopping when it is fast enough, and saying what you did not touch

    Tips

    • Take Practical Coach · Make It Fast first.
    • Say your prediction before you run anything.

    More in Practical Coding Interview Prep: AI Coach Edition

    • Practical Mock · Build With Data
    • Practical Coach · Read a Codebase
    • Practical Mock · Read a Codebase
    • Practical Coach · Extend a Feature
    • Practical Mock · Extend a Config Store
    • Practical Coach · Make It Fast
    • Practical Coach · Debug a Production Error
    • Practical Mock · Debug a Production Error
    • Practical Coach · Hunt the Logic Bug
    • Practical Mock · Find the Logic Bug
    • Practical Coach · Debug: Races and Leaks
    • Practical Mock · Debug a Race and a Leak
    View the full course (32 sessions) →