Skip to the guide

Step 5: Code the core flow first

IntermediateConcept6 pages

Step 5 is where the code starts. On the LLD clock you have ten minutes, from minute 20 to minute 30, to make the main operation run once from end to end. The skill is choosing which methods to write in those ten minutes, and in what order. HLD has the same habit for boxes, every feature end to end before any deep dive (The first working design). This page is the LLD version, inside the code.

One pipe to one tap

A plumber fitting out a new house doesn't start by fitting every tap in every room. She runs one pipe from the water main to the kitchen tap, with every joint along the way, and turns the water on. If water comes out of the tap, every joint on that path works. Each other pipe end gets a cap and a label, "bathroom" or "garden", so nobody thinks it's finished. The rooms come later, one at a time, with water already in the house.