Practice mode

Sample Coding Round

This is the exact interface you get in a real interview. Nothing here is timed, scored against you, or saved.

Sum of an Array
EasyArrays

Given a list of integers, print their sum. Input format: - Line 1: a single integer n — the count of numbers (1 ≤ n ≤ 1000). - Line 2: n space-separated integers (each between -1,000,000 and 1,000,000). Output format: - A single line containing the sum. Example: Input: 5 1 2 3 4 5 Output: 15

Test cases your code runs against (3)

stdin: 5 ⏎ 1 2 3 4 5stdout: 15
stdin: 1 ⏎ -7stdout: -7
stdin: 4 ⏎ 1000000 2000000 3000000 4000000stdout: 10000000
Your Solution

(the real round has neither — you start from the boilerplate)

How to handle this round

Read the input format twice

More failed runs come from misreading the input format than from bad logic. Check how many lines there are and what's on each one before you write anything.

Run before you submit

Running costs you nothing and catches the silly mistakes — a stray print statement, a missing newline, reading one number too few. Submitting untested code is the most common self-inflicted wound.

Get something working, then improve it

A brute-force solution that passes beats an elegant one that doesn't compile. Say out loud that you're starting simple and will optimise after — interviewers read that as good judgement, not weakness.

State your complexity without being asked

Finish with one sentence: "this is O(n) time and O(n) space because...". It's the single fastest way to signal that you understand your own solution.

Check the edges

Empty input, one element, all duplicates, negative numbers, the answer not existing at all. Walk through at least one edge case before you submit.

Never go silent

In the real round an interviewer is listening. If you're stuck, say what you're considering and why you're unsure — a reasoned dead end scores far better than two minutes of nothing.

What changes in a real round
  • The problem is generated from the job description you're interviewing against, so it matches the role's level and stack.
  • It comes after a spoken question round, and the interviewer talks you through it — in meeting mode your mic stays on, and how you explain your thinking becomes part of the written feedback.
  • Your score is saved to your progress history, and you can download a PDF report of the whole interview.
  • You get one problem and no working solution to fall back on.