Skip to main content
New: Coding Practice

Coding interview practice with an AI coach and mock rounds.

Practice the problems. Then practice the interview.

OphyAI Coding Practice is a practice room for coding interview prep. Solve 153 algorithm problems across 18 patterns in Python or JavaScript, plus 25 Terraform tasks. Open hints one at a time, ask an AI coach to check your plan and review your code, then run a mock coding interview with a voice AI interviewer.

Free account: 4 sample problems. Pro ($29 a month) or Premium ($59 a month): the full library and the coach, with no credits per problem.

Easy · Arrays and hashingPair with target sum
AI coachPairs with you like a senior engineer. It never hands over the answer.
Your plan

One pass. Keep a map from value to index. For each value, check if target minus value is already in the map.

Plan check

That plan works and meets the target: O(n) time and O(n) space. Before you code, say why you check the map before you store the value. Then try [4, 4] with a target of 8 in your head.

solution.pySaved
def pair_sum(nums: list[int], target: int) -> list[int]:    seen = {}    for i, value in enumerate(nums):        need = target - value        if need in seen:            return [seen[need], i]        seen[value] = i    return []
Results3 of 3 sample tests passed
Run checks the sample tests. Submit runs every test.
An example session on a free sample problem, also known as Two Sum. Every problem is written in our own words.
What it is

Coding interview prep in one place

Learn the patterns, solve problems with real tests, get feedback on your plan and your code, then sit a full mock technical interview. It all lives in one tab.

Algorithm problems
153
Patterns
18
Terraform tasks
25
Languages: Python and JavaScript
2

A problem library by pattern

153 algorithm problems across 18 patterns, plus 25 Terraform tasks, in Easy, Medium and Hard. Each one has 3 hints and a full solution.

See the library

An AI coach that pairs with you

It checks your plan before you code, points at the bug when a test fails, and reviews your code once it passes. It never hands over the answer.

How a session works

Mock coding rounds out loud

A timed round with two problems and a voice AI interviewer. You finish with a scorecard and three fixes for next time.

See the mock round

Progress you can see

A coding streak, a heatmap of your last 120 days, progress for each pattern and achievements as you go.

See your progress view
The library

153 coding interview practice problems across 18 patterns

Problems are grouped by the pattern that solves them, so you learn the idea once and use it again. Filter by pattern, level, company or status, or search by name.

Patterns18 patterns · 153 algorithm problems
  • Arrays and hashing12 / 12
  • Two pointers8 / 8
  • Sliding window6 / 8
  • Stack5 / 8
  • Binary search4 / 9
  • Linked lists6 / 10
  • Trees9 / 15
  • Tries1 / 3
  • Heaps3 / 7
  • Backtracking2 / 9
  • Graphs4 / 13
  • Advanced graphs0 / 6
  • 1D dynamic programming3 / 12
  • 2D dynamic programming1 / 10
  • Greedy2 / 7
  • Intervals3 / 6
  • Math and geometry2 / 5
  • Bit manipulation1 / 5
Every pattern and its problem count. The solved numbers are an example.
Problem library178 problems
  • Pair with target sumFreeAlso known as Two SumEasy
  • Longest stretch without repeatsAlso known as Longest Substring Without Repeating CharactersMedium
  • Balanced bracketsFreeAlso known as Valid ParenthesesEasy
  • Count the landmassesAlso known as Number of IslandsMedium
  • Recent items cacheAlso known as LRU CacheMedium
  • Rain between barsAlso known as Trapping Rain WaterHard
Six of the 178 problems. “Often asked at” tags are our judgment, not company question lists.

In our own words

Every problem is written by OphyAI, with our own tests and solutions. "Also known as" shows the classic name, so you know which well-known problem it matches.

Often asked at

Company tags show where we think a problem type comes up. They are our judgment, not company question lists. Filter by a company to focus your prep.

Problem of the day

One problem, the same for everyone, every day. A quick way to keep your streak going when you only have a few minutes.

Terraform track

25 Terraform tasks for DevOps and cloud interviews

Write the Terraform for a real-world ask, such as a private bucket for app logs or a VPC with public and private subnets. Tasks use the AWS provider 5.x. Each one lists its requirements, and your code is checked against every one of them. It is not a real terraform plan or apply, and nothing is created in an AWS account.

Getting ready for a DevOps round? Read our Terraform interview questions guide.

6 groups
  • Variables, outputs and locals
  • Storage
  • Networking
  • Compute
  • IAM and security
  • Modules and reuse

Example requirements from the free task: versioning is turned on for the bucket, all four public access settings are blocked, and the bucket ARN is output as bucket_arn.

New to patterns? Start with our guide to coding interview patterns.

How a session works

Plan first, hints one at a time, a coach that reviews your code

A practice session works the way a good interview does: you say your plan, write the code, test it, and talk about the cost. The coach helps at each step without giving you the answer.

  1. Step 1

    Pick a problem and a language

    Choose from the library or the problem of the day. Pick Python or JavaScript. The starter code is ready.

  2. Step 2

    Say your plan

    Type your approach in a few lines and press Check my plan. The coach tells you if it works, without writing code.

  3. Step 3

    Write it and run it

    Your code runs in the browser. Run checks the sample tests. Submit runs every test.

  4. Step 4

    Stuck? Open one hint

    Each problem has 3 hints. They open one at a time, so you only see as much as you need.

  5. Step 5

    Fix it, then get a review

    Why is it failing uses your last run to point at the bug. Review my code gives a verdict, your Big O against the target, and the edge cases.

  6. Step 6

    Read the solution

    Once every test passes, the solution opens: how to solve it, the target time and space, code in both languages, and "If they ask next" follow-up questions.

Want the solution early?

You can open it any time. The problem is marked as revealed and goes on your Worth a retry list, so you come back and solve it on your own later. Pro and Premium include 30 coach requests a day; the free sample problems include 3 a day.

Mock coding round

A mock coding interview with a voice AI interviewer

A mock coding round is 45 or 60 minutes with two problems picked for your level, a voice AI interviewer (typing always works too) and a scorecard for problem solving, coding, correctness, complexity, testing and communication.

  • Pick Python or JavaScript, your level, 45 or 60 minutes, and a company style if you want one.
  • You get two problems picked for your level, in the same editor and tests as practice.
  • The interviewer asks for your approach before you code, like the real thing, and reacts to every run.
  • Talk hands free, or hold the mic while you speak. You can always type instead.
  • Finish to get a scorecard: an overall score, six skill scores, the tests each problem passed, three fixes and the moments that mattered.
LevelProblemsBar
JuniorTwo easy problems65
Mid levelOne easy, one medium70
SeniorOne medium, one hard80

The bar is OphyAI's own benchmark for each level, not any company's hiring bar. Each round uses 20 credits on Pro or Premium.

Start a mock round
Scorecard · Mid level · Python · 45 minRound completeTwo problems, one easy and one medium
74/ 100
Mid level bar 70+5 vs last round
Six scoresThe line marks the bar for this level
Problem solving80Coding78Correctness71Complexity76Testing58Communication82
Problems
  • 01Any value repeatedEasy10 / 10 tests9 minO(n) · target O(n)
  • 02Merge overlapping rangesMedium9 / 12 tests27 minO(n log n) · target O(n log n)
Three fixes for next time
  1. 01 · TestingTest the edges firstBefore you submit, walk through an empty list and two ranges that only touch.
  2. 02 · CorrectnessCheck the merge ruleSay out loud whether ranges that share an end point should merge.
  3. 03 · ComplexityName the cost earlyState the time and space cost before you code, not after.
An example Scorecard after a mid level round. Scores are an AI estimate, and the bar is OphyAI's own benchmark.
Progress

Streaks, a heatmap and achievements

See what you have done, and what to do next.

  • Problems solved, by difficulty.
  • A coding streak. Run or submit once a day to keep it going.
  • A heatmap of your last 120 days of runs and solves.
  • Progress for each pattern, so you can see which ones need work.
  • Recommended next problems, and a Worth a retry list for problems you left unsolved or solved with the solution open.
  • Achievements: first problem solved, 10, 50 and 100 solved, a whole pattern finished, a 7 day coding streak, a first mock round, a mock score of 80, and 5 Terraform tasks. Some add a few bonus credits.
Solved
42
of 178 problems
Streak
6 days
19 active days in the last 30
By difficulty
Easy21/43Medium18/113Hard3/22
Last 120 days69 active days
Achievements
  • First problem solved
  • 10 problems solved
  • 7 day coding streak
  • A whole pattern finished
  • First mock coding round
  • 5 Terraform tasks solved
An example of the progress view. Every number is an example.
Python and JavaScript

Python and JavaScript coding interview questions

The library covers the classic questions that come up in coding interviews. Each one has starter code, tests and a solution in both Python and JavaScript. Here are 12 of them, by our name and the classic name.

ProblemAlso known asPatternLevel
Pair with target sumTwo SumArrays and hashingEasy
Product of the othersProduct of Array Except SelfArrays and hashingMedium
Balanced bracketsValid ParenthesesStackEasy
Longest stretch without repeatsLongest Substring Without Repeating CharactersSliding windowMedium
Triplets that cancel out3SumTwo pointersMedium
Search a rotated listSearch in Rotated Sorted ArrayBinary searchMedium
Reverse a chain of nodesReverse Linked ListLinked listsEasy
Recent items cacheLRU CacheLinked listsMedium
Layer by layerBinary Tree Level Order TraversalTreesMedium
Count the landmassesNumber of IslandsGraphsMedium
Merge overlapping rangesMerge IntervalsIntervalsMedium
Fewest coins for an amountCoin Change1D dynamic programmingMedium

Python coding interview questions: what to know

  • dict and set give fast lookups. Most hashing problems start there.
  • Use collections.deque as the queue for breadth-first search, and heapq for heaps. heapq is a min-heap, so push negative numbers for a max-heap.
  • sorted() and slicing keep code short, but say the cost out loud: sorting is O(n log n) and a slice makes a copy.

JavaScript coding interview questions: what to know

  • Use Map and Set for lookups. A plain object turns its keys into strings.
  • array.sort() compares items as strings by default, so pass (a, b) => a - b to sort numbers.
  • There is no built-in heap or deque. Know how you would write a small one, or say how you would work around it.

What it costs, and what is free

Coding Practice is included on Pro and Premium, with no credits per problem. Free accounts can try 4 problems.

Free account4 sample problems: Balanced brackets, Pair with target sum, Tallest branch, and the Terraform task Private bucket for app logs. 3 coach requests a day on them.
Pro$29 a month with 300 credits, or $278 a year. The full library, the coach on every problem (30 requests a day) and mock rounds.
Premium$59 a month with 500 credits, or $566 a year. Everything in Pro, plus Coding Interview for the live round and the other Premium tools.
Mock coding round20 credits a round, on Pro or Premium
Interview Passes and the Copilot trialDo not unlock Coding Practice

Credits are shared with Interview Copilot and the other tools. See pricing

Who it is for

Technical interview prep for people with a real interview coming up

Coding Practice is for getting ready before the interview. For help in the live round, Premium has Coding Interview.

Students and new grads

Getting ready for a first technical interview or an internship screen, and want a plan to follow.

Engineers going back to interviewing

After a few years in one job, the patterns need to come back fast.

Career changers and bootcamp grads

You want a coach that explains why a plan works, not just a list of answers.

DevOps, cloud and platform engineers

The Terraform track covers the infrastructure tasks that show up in those interviews.

People who freeze when they talk and code

The mock round makes you explain your thinking out loud, with a timer running.

Anyone short on time

153 algorithm problems, grouped by pattern, is a set you can actually work through.

Comparing practice sites? See our honest list of LeetCode alternatives, or read about Coding Interview for the live round.

What it can and cannot do

  • 153 algorithm problems is a focused set, not a huge one. Big practice sites have thousands. If you want more volume, use one alongside it.
  • Algorithm problems are in Python and JavaScript only.
  • Terraform tasks are checked against their written requirements. It is not a real terraform plan or apply.
  • Tests check that your answer is right. They do not time your code; the coach and the solution compare your Big O with the target.
  • The coach has a daily limit: 30 requests a day on Pro and Premium, 3 a day on the free sample problems.
  • The scorecard is an AI estimate. The bar for each level is OphyAI's own benchmark, not any company's hiring bar.
  • "Often asked at" tags are our judgment, not company question lists.
  • Coding Practice runs in your web browser. It is not in the iPhone or Android app.

Coding Practice questions

What is OphyAI Coding Practice?

Coding Practice is a place to practice for coding interviews. It has 178 problems: 153 algorithm problems across 18 patterns and 25 Terraform tasks, in Easy, Medium and Hard. You write code in an editor in your browser, run tests, open hints one at a time, and ask an AI coach to check your plan or review your code. When you feel ready, a mock coding round puts you in a timed interview with a voice AI interviewer and ends with a scorecard.

Are these LeetCode problems?

No. Every problem is written in our own words, with our own tests and solutions, and OphyAI is not tied to LeetCode in any way. Many interview problems have a well-known classic name, so each problem shows it under "Also known as". That way you can tell, for example, that "Pair with target sum" is the problem people call Two Sum.

Which programming languages can I use?

Python and JavaScript for the 153 algorithm problems. You can switch between them on any problem, and the starter code and the solution come in both. The 25 Terraform tasks use Terraform with the AWS provider 5.x. No other languages are available.

How does the AI coach help without giving away the answer?

The coach has three buttons. Check my plan reads the approach you typed and tells you if it works, without writing code. Why is it failing uses your last run to point at the bug. Review my code gives a verdict, your Big O against the target, and the edge cases to think about. You can also ask it any question about the problem. It does not hand over the full solution before you solve the problem or choose to see the solution. Pro and Premium include 30 coach requests a day.

What is a mock coding round?

A mock coding round is a 45 or 60 minute practice interview with two problems picked for your level. Junior gets two easy problems, Mid level gets one easy and one medium, and Senior gets one medium and one hard. A voice AI interviewer asks for your approach, reacts to your test runs and asks follow-ups. You can talk hands free, hold to talk, or type. You can also pick a company style. The round ends with a scorecard. Each round uses 20 credits on Pro or Premium.

What is on the mock round scorecard?

An overall score from 0 to 100 next to the bar for your level, six skill scores (problem solving, coding, correctness, complexity, testing and communication), how many tests each problem passed and how long it took, three fixes for next time, the moments that mattered, and the patterns to practice next. The scorecard is an AI estimate, and the bar for each level is OphyAI's own benchmark, not any company's hiring bar.

Is there free coding interview practice?

Yes. Anyone with a free OphyAI account can open 4 sample problems: Balanced brackets, Pair with target sum, Tallest branch and the Terraform task Private bucket for app logs, with 3 coach requests a day on them. The full library, the coach on every problem and mock rounds come with Pro ($29 a month) or Premium ($59 a month), with no credits per problem. Interview Passes and the Copilot trial do not unlock Coding Practice.

How are the Terraform tasks checked?

Each Terraform task lists its requirements, such as "Versioning is turned on for the bucket", and your code is checked against each one. It is not a real terraform plan or apply, and nothing is created in an AWS account. The tasks use the AWS provider 5.x and cover variables and outputs, storage, networking, compute, IAM and security, and modules.

How is Coding Practice different from Coding Interview?

Coding Practice is for getting ready before the interview: problems, hints, a coach and mock rounds. Coding Interview is a separate Premium tool for the live technical round: you screenshot the problem and get an approach and working code beside your editor. Practice is included on Pro and Premium; Coding Interview is on Premium only.

Does Coding Practice work on my phone or in the desktop app?

Coding Practice runs in your web browser at app.ophyai.com. The OphyAI desktop app for Mac and Windows links to it. It is not in the iPhone or Android app.

Solve your first problem tonight.

Start with the 4 free problems. When you are ready, the full library, the coach and mock rounds come with Pro.