My Coding Routine
Some mornings, opening a coding platform feels like opening the fridge for the third time: I know what I’m supposed to find, but somehow I’m hoping something new has appeared.
That’s why I like having a routine. Mine revolves around a daily problem from GeeksforGeeks or LeetCode, steady progress through a structured sheet such as Striver’s A2Z or NeetCode, and a weekly contest to see how I handle problems when the clock is ticking. On a good day, I work through two or three focused questions, depending on their difficulty and how much time I have.
My daily start
I like starting with one daily problem, either GFG POTD or LeetCode’s Daily Challenge. I read the prompt slowly and make sure I understand what the input and output mean before touching the keyboard. If there are examples, I trace them by hand. If the constraints are included, I check them too; they often hint at which approaches will be too slow.
If I’m stuck, I don’t immediately open the editorial. I try a small example, write down what I know and look for a clue: a repeated pattern, a sorted input, a need to track frequency, or a choice that must be revisited later. I might set a reasonable time limit for independent thinking perhaps 20 to 30 minutes when I’m learning a topic. If I’m still stuck, I look for a hint or study the solution, then close it and try to reproduce the idea myself.
The sheet is the syllabus
A structured sheet helps me avoid random-walk practice. Striver’s A2Z sheet is organised as a learning path through DSA topics, while NeetCode’s roadmap groups interview problems by patterns and topics. I choose one as my main track for a period of time, rather than switching every week because a new list is trending.
If I’m learning arrays or hashing, I stay with those questions long enough to understand the common moves. If I jump from an easy array question to a hard graph problem and then to dynamic programming because they happen to be next in three different lists, I may feel busy without building a foundation.
My daily target is usually two or three focused questions, adjusted for difficulty and available time. That doesn’t mean I need to solve three new problems every day. One challenging medium problem, followed by a careful review, can be a productive session. On a lighter day, I might solve two easy questions to practise implementation. On a packed college day, I might do one POTD and review an older question.
I also avoid counting a GFG POTD or LeetCode Daily Challenge twice. If it matches the topic I’m studying, it can be one of my sheet problems for that day. That way, I’m using the daily challenge as part of my plan, not turning it into an extra obligation.
What “solving” means to me
A green “Accepted” is a nice little dopamine snack. It is not proof that I understand the problem. After a successful submission, I check whether my approach is correct for the constraints.I look at time and space complexity, but I also ask whether I can explain why the algorithm works.
Get Nehal Garg’s stories in your inbox
Join Medium for free to get updates from this writer.
If I needed a hint or editorial, I mark that honestly. I might label a question as “independent,” “needed a hint” or “studied solution.” That small distinction tells me what to revise. It also stops me from accidentally treating recognition as mastery. Seeing a familiar solution and thinking “yes, that makes sense” is different from rebuilding it from a blank page.
The weekly contest
A weekly contest gives my routine a different kind of practice. On a normal evening, I can pause, look up a concept and take a break. During a contest, the clock keeps moving, the problem statements may be unfamiliar and my first idea may be wrong. That pressure is useful to practise, as long as I treat the contest as feedback rather than a verdict on my coding future.
Before the contest, I try to be ready: a charged laptop, stable internet, a working editor and a drink within reach. I choose a language I know well. Contest day is not ideal for discovering that my template has a missing semicolon or that I forgot how to parse input.
During the contest, I scan all the problems first. I start with the one I understand best, then decide whether to continue or switch. If a problem is eating time without progress, I pause and look for another route. Spending half the contest staring at one stubborn question can be less useful than securing a problem I can solve.
After the contest, I review. This is where a lot of the learning happens. I revisit unsolved questions, understand the intended idea and try to implement it without copying. I note whether I lost time because I misunderstood the statement, missed a pattern, made a bug or got trapped polishing one approach. Each cause suggests a different thing to practise next week.
I don’t need to compare my rank with someone who has been doing competitive programming since school. I can track whether I understood more problems, made fewer avoidable mistakes or recovered faster after getting stuck. That is progress too.
How I review so the solution stays in my head
I use a simple review loop. After learning a problem, I revisit it later that week and try to outline the approach without looking. If I can’t remember it, I inspect my notes, close them, and explain it again in my own words.
A useful explanation has three parts: the observation that led to the approach, the steps of the algorithm and why those steps produce the answer. I revisit questions that taught me a pattern, not every question I’ve ever submitted. My notes might include the problem link or title, topic, key idea, complexity, mistake I made and a date to retry it.
When I need to look at the solution
If I read the full explanation, I close it afterward and write the solution from scratch. Then I test it on examples and edge cases. If I still can’t explain why it works, I add the problem to my revision list. That way, using an editorial becomes a learning step instead of a shortcut I pretend I didn’t take.
I also notice whether the problem is hard because I lack a concept or because I’m rusty with implementation. If I don’t understand a graph traversal, I need to revisit the concept and practise a couple of examples. If I understand the algorithm but keep making indexing mistakes, I need to slow down and test carefully.
Keeping the routine realistic during college
My coding routine has to fit around college, not compete with every other part of it. During a lighter week, I may have time for a longer session and a contest. During exams, I may only maintain the habit with one smaller problem or a short revision session. I don’t treat a busy day as proof that I’ve failed.
I also separate focused practice from passive watching. Videos and editorials can help me understand a pattern, but I still need to implement it myself. After watching an explanation, I close the tab, open the editor and try to write the solution without peeking. Otherwise, my brain gets a very convincing illusion of competence.
I keep one main language for practice, especially while building fundamentals. Switching languages can be useful later, but debugging a new language’s syntax while learning a new algorithm adds an unnecessary second problem. I also spend time understanding the basics of my chosen language collections, sorting, input, recursion and integer limits.







