Interview questions

Coding Interview Preparation: Plans for 2, 4 or 8 Weeks

July 7, 2025Updated November 12, 202614 min read
Can Cracking The Coding Be Your Secret Weapon For Acing Any Professional Interview

Coding interview preparation that fits your calendar: 2, 4 and 8-week plans, a routine for practising one problem, and how to adjust for each employer.

Good coding interview preparation is less about how many problems you solve and more about four habits: learning the common patterns in priority order, practising against a timer in a plain editor, saying your reasoning out loud while you code, and testing your own solution before anyone asks you to. If you have two weeks, you cover the highest-priority patterns and build those habits; with eight weeks, you can add the lower-priority topics and enough mock interviews to make the habits automatic.

If you are not yet sure which rounds you will face or where the coding screens sit, start with our walk-through of the software engineer interview process, round by round, then come back here to build the plan.

What employers' own prep pages ask you to practise

Start with the prep pages employers publish themselves, because they describe the conditions you are practising for.

Meta's software engineering prep article describes a 45-minute coding round with about 35 minutes of actual coding, two problems in the initial screen, and questions designed to be solved in roughly 10 to 30 minutes each. It asks candidates to think out loud, to find and fix their own bugs, and to practise in a plain text editor without syntax highlighting or auto-completion. The article was first written in 2016 and last updated in 2022, so treat the timings as a guide and confirm the current format with your recruiter.

Amazon's SDE II prep page describes a loop of four 55-minute interviews and says to expect to write syntactically correct code, with "no pseudo code". It frames the job as writing scalable, robust and well-tested code, and tells candidates to check edge cases and make sure bad input cannot slip through. Its software development topics page suggests practising coding outside an integrated development environment.

Google's interview tips page puts the emphasis on reasoning: questions often leave room for clarification, rephrasing a question is fine, and you should say when you are making an assumption and why. It states that the interviewer is looking at your thought process rather than only the answer, and that you should expect follow-up questions.

Read together, those pages describe one skill: solving an unseen problem in a bare editor while narrating, then proving the code works. A candidate who has solved hundreds of problems silently in a full IDE has trained for a different test, which is why the plans below favour timed, spoken practice over volume.

How to practise one problem: a six-step routine

Run every practice problem through the same routine so it becomes automatic. The Tech Interview Handbook, a free third-party guide, uses 30 minutes per question as its working assumption, which matches the upper end of Meta's range, so a 30-minute timer is a sensible default.

  • Clarify the problem and write two or three examples of your own, including an edge case such as an empty input, before you think about code.
  • State a brute-force approach out loud with its time complexity, even if you already suspect a better one, so the interviewer hears a working baseline.
  • Look for the repeated work in the brute force and name the data structure or pattern that removes it, such as a hash map, two pointers or a heap.
  • Write the code while explaining each block, using clear names and no pseudocode.
  • Test by tracing your own examples through the code line by line, and fix bugs before the interviewer points them out.
  • Finish by stating time and space complexity and one trade-off or follow-up you would consider.

Skipping the first two steps means you may code the wrong problem; skipping the last two leaves the interviewer to find your bug, which Meta's page specifically asks you to avoid.

Worked example: a nearby duplicate (illustrative)

Here is the routine applied to LeetCode's Contains Duplicate II. Given an integer array nums and an integer k, return true if two different indices i and j hold the same value and are at most k apart.

Clarifying questions come first. Can k be zero, and if so, is the answer always false because the indices must differ? Can the array be empty? Can values be negative? Those questions also give you test cases, such as [1, 2, 3, 1] with k = 3, which should return true, and [1, 2, 3, 1, 2, 3] with k = 2, which should return false.

The brute force compares each element with the next k elements, which takes O(n·min(n, k)) time and O(1) extra space. The repeated work is scanning back over the same window again and again, when all you really need is the most recent index at which each value appeared. A hash map from value to last index gives you that in one pass:

def contains_nearby_duplicate(nums, k):
    last_seen = {}  # value -> most recent index
    for i, x in enumerate(nums):
        if x in last_seen and i - last_seen[x] <= k:
            return True
        last_seen[x] = i
    return False


assert contains_nearby_duplicate([1, 2, 3, 1], 3) is True
assert contains_nearby_duplicate([1, 0, 1, 1], 1) is True
assert contains_nearby_duplicate([1, 2, 3, 1, 2, 3], 2) is False
assert contains_nearby_duplicate([], 5) is False
assert contains_nearby_duplicate([7, 7], 0) is False

This runs in O(n) time and O(n) extra space in the worst case, when every value is distinct. A good closing line names the follow-up: keeping only the last k values in a set, and removing the oldest as the window slides, cuts the extra space to O(min(n, k)) without changing the time.

The code itself is short; the clarifying questions, the spoken brute force and the traced tests are what show an interviewer how you think.

How much practice is enough

No employer page we read gives a problem count. The most useful yardstick we found, from the Tech Interview Handbook, is framed in hours: about 30 hours for the bare minimum and about 100 hours to be well prepared, with three months at about 11 hours a week as its recommended period.

Two weeks at about two hours a day gives you roughly the 30-hour minimum, and eight weeks at about 12 hours a week comes close to the 100-hour mark, which is why the plans below scale topics rather than problem counts. The Handbook's Grind 75 tool, which draws on a pool of 169 questions and builds a schedule for the time you have, can fill the practice slots once you know which topics to cover.

A better signal than any count is whether you can take an unseen medium problem from a pattern you have studied and finish the full routine within 30 minutes while talking. Once that holds across your high-priority topics, mock interviews are a better use of the remaining time than more grinding.

Three coding interview preparation plans

The plans follow the topic priorities in the Tech Interview Handbook's study plan, which marks arrays, strings, sorting and searching, matrices, trees and graphs as high priority, and leaves dynamic programming, binary topics, maths and geometry as low priority. They assume you are working full time, with weekday evenings and longer weekend sessions.

If you have two weeks

Spend the first week on arrays, strings, hash tables and matrices, then sorting and binary search, running every problem through the full routine with a timer. Spend the second week on trees and graphs, especially breadth-first and depth-first search, both on Meta's review list. Do at least two mock interviews in the second week, with a friend or a practice tool, and keep the last two days for re-solving problems you got wrong rather than starting anything new.

Drop dynamic programming, tries, bit manipulation and geometry entirely. If you face an online assessment rather than a live round, swap most narration practice for timed problems in the assessment's own practice environment.

If you have four weeks

Week one covers arrays, strings, hash tables and recursion; week two covers sorting and searching, matrices, linked lists, stacks and queues; week three covers trees, graphs, heaps and tries; and week four covers intervals plus a first pass at dynamic programming. Hold one mock interview a week from week two onwards, and use the final week's weekend for mixed problem sets where you do not know the pattern in advance, because recognising the pattern is part of what the interview tests.

If a week slips, drop the low-priority topics first, then tries, and protect the mock interviews, which are the closest you get to narrating under real pressure.

If you have eight weeks

Use the first four weeks for the topics in the four-week plan, then switch to mixed practice for weeks five to eight, roughly following a Grind 75 schedule set to four weeks. That second half is where you can give dynamic programming proper time, revisit every problem you failed, and run a mock interview each week. Eight weeks also leaves room to sharpen the language you will use, whether that means Python's standard library or, if you interview in Java, the Java-specific traps that break otherwise correct solutions.

If time runs short, cut the low-priority topics before the mock interviews. If your role includes system design, take time from mixed practice rather than from the high-priority coding topics.

In the last few days of any plan, stop learning new material. Re-solve a handful of problems you know, do one final mock interview, and check your setup: Meta's page suggests a quiet room, a reliable connection and headphones so both hands stay free for coding.

Using company tag lists without memorising answers

Company-tagged problem lists are useful for telling you which patterns an employer's interviewers have reportedly favoured, not as a question bank to memorise. Meta's page says you will likely be asked to explain your solution, and Google's says to expect follow-up questions, which is exactly where a memorised answer runs out.

Use a company list to choose patterns, then practise them cold. Pick problems you have not seen, solve them under a timer, and only then compare with published solutions. When you recognise a problem, solve it anyway and then change one constraint yourself, such as sorted versus unsorted input, to check that you understand why the solution works. For a list of the most common LeetCode problems grouped by pattern, see our cross-checked list of LeetCode interview questions, which this page deliberately does not repeat.

How to adjust for the employer type

The routine stays the same everywhere, but the last week of any plan should rehearse the conditions you will actually meet.

Big Tech. Expect live rounds in a shared editor with little tooling, as Meta and Amazon describe, so practise in a plain editor and narrate throughout. For Amazon's new-grad online assessment, the coding part averages about 70 minutes, and Amazon offers a practice test with two unscored questions; its page also advises moving on and returning if you get stuck.

Indian IT services firms. We could not open an official TCS, Infosys, Wipro or Cognizant page that fixes the current test pattern, and prep sites disagree. One prep site, PlacementPreparation.io, whose page is labelled 2026, describes TCS's National Qualifier Test as a foundation section of numerical, verbal and reasoning questions followed by an advanced section that includes coding questions (its table lists three questions and 90 minutes, shared with the rest of the advanced section). Read the candidate instructions in the exam portal for your own drive, add aptitude practice to the two-week plan, and favour clean, correct solutions to standard problems over hard ones.

AI-screening platforms. Mercor's help centre says most of its AI interviews take about 20 minutes and ask role-specific questions, and that some are technical and involve in-depth discussion of past experience. It also offers a free practice interview you can take as often as you like and advises speaking clearly without long pauses. micro1's guide describes open-ended technical and scenario questions from an AI interviewer, plus a coding challenge for technical roles. For both, rehearse explaining your past projects out loud as seriously as you rehearse problems.

Karat-run screens. Karat's candidate page describes a one-hour session with an Interview Engineer: a brief introduction, about 10 minutes of discussion questions and about 40 minutes of programming in a fully tooled IDE. The discussion block rewards the out-loud reasoning from the routine above, and our guide to what a Karat interview tests covers its multi-part coding questions and scoring in detail.

Rehearsing the spoken part with Verve AI

Narrating is the hardest of the four habits to build alone, because nobody notices when you go quiet. Verve AI's AI Mock Interview offers role-based practice, including a Software Engineer option, with a simulation tailored to your resume and industry and a feedback report after the session. Use it for the explaining half of preparation, such as walking through your past projects, which AI-screening platforms and Karat's discussion block both ask for. Do this practice beforehand, not during the real thing: Google's interview tips page, read on 12 November 2026, states that "Google Search and AI are amazing tools, but are not permitted to be used during your interviews."

FAQ

How long does coding interview preparation take?

The Tech Interview Handbook estimates about 30 hours for a bare minimum and about 100 hours to be well prepared, and no employer page we read sets a problem count. Two weeks at two hours a day reaches the minimum, and eight weeks at about 12 hours a week comes close to the fuller figure. A better readiness test is solving an unseen medium problem in about 30 minutes while explaining your reasoning.

Should I memorise solutions from company tag lists?

No. Interviewers ask you to explain your solution and follow up with new questions, so a memorised answer breaks quickly. Use company lists to decide which patterns to practise, then solve unfamiliar problems in those patterns under a timer.

What should I drop if I only have two weeks?

Drop dynamic programming, tries, bit manipulation and geometry, and focus on arrays, strings, hash tables, sorting and searching, trees and graphs. Keep at least two mock interviews in the second week. Spend the last two days re-solving problems you got wrong rather than learning new topics.

Do I need to talk while I code?

For live rounds, yes. Meta's prep article asks candidates to think out loud, and Google's tips page says interviewers look at your thought process rather than only the answer. Practise narrating from your first problem so it feels normal by the interview.

Sources

  • Meta coding round format (45 minutes, 35 minutes coding, two problems in the screen, 10 to 30 minutes per question), think out loud, fix your own bugs, plain editor practice, BFS/DFS in review list, headphones and quiet room, 2016 origin and 2022 update: https://www.metacareers.com/blog/preparing-for-your-software-engineering-interview-at-meta/
  • Amazon SDE II loop of four 55-minute interviews, syntactically correct code with no pseudo code, scalable, robust and well-tested code, edge cases and bad input: https://amazon.jobs/content/en/how-we-hire/sde-ii-interview-prep
  • Amazon: practise coding outside an IDE: https://amazon.jobs/content/en/how-we-hire/interview-prep/software-development-topics
  • Amazon new-grad OA coding assessment about 70 minutes on average, practice test with two unscored questions, move on if stuck: https://amazon.jobs/content/en/how-we-hire/university/sde-oa
  • Google: clarification, rephrasing, stating assumptions, thought process over answer, follow-up questions, and the AI-use rule quoted (read 12 November 2026): https://www.google.com/about/careers/applications/interview-tips/
  • Tech Interview Handbook (third-party): 30 minutes per question as a working assumption, about 30 hours minimum and 100 hours well prepared, Grind 75 generates plans for varying lengths, mock interviews: https://www.techinterviewhandbook.org/coding-interview-prep/
  • Tech Interview Handbook study plan: three months at 11 hours a week as the recommended period, topic priorities (high, mid, low), weekly topic order, Grind 75 for any time frame: https://www.techinterviewhandbook.org/coding-interview-study-plan/
  • Grind 75 pool of 169 questions and customisation: https://www.techinterviewhandbook.org/grind75/faq
  • Tech Interview Handbook techniques (clarify, extra examples as test cases, common data structures, complexity improvements): https://www.techinterviewhandbook.org/coding-interview-techniques/
  • Karat one-hour format, Interview Engineer, about 10 minutes discussion and 40 minutes programming, fully tooled IDE: https://www.karat.com/candidate-experience/
  • Mercor AI interview about 20 minutes, role-specific questions, some technical with in-depth discussion of past experience, free practice interview, speak clearly without long pauses: https://talent.docs.mercor.com/how-to/prepare-for-ai-interview
  • TCS National Qualifier Test pattern as described by a third-party prep site (foundation numerical, verbal and reasoning; advanced section including coding, three questions and 90 minutes shared with the rest of the section; page labelled 2026, no publication date): https://www.placementpreparation.io/tcs-nqt/syllabus-and-test-pattern/
  • micro1 AI interview: open-ended technical and scenario questions, coding challenge for technical roles, Interview Prep tool: https://www.micro1.ai/ai-interview-guide
  • AI Mock Interview: role-based practice including Software Engineer, simulation tailored to resume and industry, feedback report: https://www.vervecopilot.com/ai-mock-interview
R

Ryan

CEO of Verve AI

Related reads

Explore Related Interview Guides

Software Engineer Interview Process: Every Round Explained
November 12, 2026Interview blog

Software Engineer Interview Process: Every Round Explained

The software engineer interview process round by round: what each stage tests, how it differs by employer and level, and how long it takes.

Read story
What Do You Need To Know About System Design Interviews Before Interviewing
March 18, 2026Interview blog

System Design Interview Prep: One Prompt Worked End to End

What a system design interview tests, how a 45-minute round runs, a URL shortener worked step by step, and a four-week prep plan.

Read story
Top 30 Most Common Software Engineer Behavioral Interview Questions You Should Prepare For
November 12, 2026Interview prep guide

Software Engineer Behavioral Interview Questions: 6 Stories

Software engineer behavioral interview questions fall into eight families. Learn what interviewers listen for and build six stories that cover them all.

Read guide
Top 30 Most Common LeetCode Interview Questions You Should Prepare For
February 17, 2026Interview blog

The Most Common LeetCode Interview Questions, Cross-Checked

Fifty problems appear in Blind 75, NeetCode 150 and LeetCode's Top Interview 150. Here they are by pattern, with a worked example and a Python plan.

Read story
30 Most Common Java Coding Interview Questions for 5 Years Experience
April 11, 2025Interview blog

Java Coding Interview Questions and the Java Traps in Them

Common Java coding problems with working code, what each one tests, and the Java-specific mistakes that can sink a correct algorithm.

Read story
Top 30 Most Common 10 Years Experience Java Interview Questions You Should Prepare For
October 19, 2026Interview prep guide

Core Java Interview Questions for 10 Years Experience

Twelve questions senior Java interviews return to, from HashMap and the memory model to GC choice and virtual threads, with what strong answers cover.

Read guide
City of Las Cruces Jobs Application Tips: The Playbook That Gets You Past Screening
July 12, 2026Interview prep guide

City of Las Cruces Jobs Application Tips: The Playbook That Gets You Past Screening

City of Las Cruces jobs application tips that help you avoid screening-out mistakes, complete governmentjobs.com correctly, choose the right documents, and.

Read guide
Can Leadership Experience Be The Secret Weapon For Acing Your Next Interview
May 20, 2026Interview prep guide

Leadership Experience Interview: How to Pick the Right Story

A practical leadership experience interview guide that helps you pick the right story for the role, seniority, and industry — with examples for career.

Read guide
Can Leadership Experience Be Your Ultimate Advantage In Every Interview
May 15, 2026Interview prep guide

Leadership Experience Interview: A Persona-to-Proof Playbook

Master leadership experience interview answers with persona-to-proof stories, STAR structure, and metrics that show how you moved people and decisions.

Read guide

Walk into every interview prepared and confident

Get Started For Free

Available on Mac, Windows, browser and mobile