# The Online Coding Assessment — Setup, Proctoring Rules, Time Planning, Reading Constraints and Passing Hidden Test Cases

Source: https://skills101.in/learn/career/career-online-coding-assessment — Skills101 free tutorial (Interview & Career). Updated 2026-11-21.

For most fresher software roles — on campus and off campus — the first real filter is an **online assessment (OA)**: a timed test taken on a coding platform, usually with aptitude or CS multiple-choice questions (MCQs) and one to three coding problems. Many students who can solve the problems in practice still lose marks in the test itself, because of a bad setup, poor time use or code that fails **hidden test cases**. This lesson is about the test day. The [technical interview lesson](https://skills101.in/learn/career/technical-interview-guide) covers the rounds that come after it.

Test patterns vary a lot between companies and change from year to year. Always read the instructions in your invitation email and on the test's first screen; when they differ from anything here, **the instructions win**.

## 1. The day before: system and room

A technical problem during a proctored test can end your attempt. Check these the day before, not five minutes before:

| Check | Why |
|---|---|
| Use the browser the test asks for, updated | some platforms block or misbehave on others |
| Run the platform's **system check** link if one is given | it tests camera, microphone and screen sharing |
| Laptop charged **and** plugged in | a dead battery mid-test cannot be undone |
| Stable internet, plus a mobile hotspot as backup | many platforms save code and let you resume after a short drop, but not all |
| Close other apps, notifications and extra browser tabs | pop-ups and tab switches can be flagged |
| Quiet room, light on your face, plain background | the webcam must see you clearly |
| ID card ready if asked | some tests check identity at the start |

**Practise on the same kind of platform.** Write a few problems on a practice site that uses a similar editor, with input read from standard input. Knowing how to read input quickly in your language saves real minutes.

## 2. Proctoring rules: what usually gets flagged

**Proctoring** means watching the candidate during the test, usually with the webcam, the microphone and the browser. Rules differ, but these are common reasons a test gets flagged for review:

- switching tabs or leaving full-screen mode;
- another person's face or voice in the room;
- looking away from the screen for long periods or leaving the seat;
- a phone visible or in use;
- copy-pasting large blocks of code from outside the editor.

Two honest points. First, many platforms also compare submissions to find copied code, and a flag can cancel your result even after you clear the test. Second, a company you cheat your way into will test you again in interviews and on the job. Prepare properly instead; it is also the faster route.

If something goes wrong (power cut, camera failure), take a screenshot or photo of the error if you can, and email the contact address in the invitation **immediately** with your name, test ID and the time.

## 3. Plan your time before you start

Spend the first few minutes **reading every section and every coding problem**. Then decide an order. A simple plan:

1. Do the easiest coding problem first. A fully correct solution early removes pressure.
2. Do MCQs at a steady pace. Do not spend five minutes on one MCQ; mark it and move on (if the platform allows coming back).
3. Spend the remaining time on the harder problem, aiming for partial marks if a full solution does not come.
4. Keep the last few minutes to make sure everything is **submitted**.

![Example split of a 90-minute test: 5 minutes reading everything, 25 for MCQs, 25 for the easier coding question, 30 for the second coding question and 5 for checking](https://skills101.in/learn-img/career/oa-time-plan.svg)

**Worked example.** A test has 90 minutes for 20 MCQs and 2 coding problems, all in one timer. If you give MCQs 25 minutes, that is 25 × 60 / 20 = **75 seconds per question**. After 5 minutes of reading and 25 of MCQs, 60 minutes remain. Spending 25 on the easier problem and 30 on the harder one leaves 5 minutes to check. Many tests instead give each section its **own fixed timer** and do not let you go back — then you cannot move time between sections, so the per-question pace matters even more.

## 4. Read the constraints to choose the algorithm

The **constraints** line (for example, 1 ≤ n ≤ 10⁵) tells you how fast your solution must be. A common rough guide is that a judge can run around 10⁷ to 10⁸ simple steps per second; Python usually manages fewer than C++ or Java. So estimate the steps your idea needs for the largest n:

| Largest n | Usually fits | Usually too slow |
|---|---|---|
| up to about 10 | O(n!), O(2ⁿ · n) | — |
| up to about 20 | O(2ⁿ) | O(n!) |
| up to about 500 | O(n³) | O(2ⁿ) |
| up to about 5,000 | O(n²) | O(n³) |
| up to about 10⁶ | O(n log n), O(n) | O(n²) |
| up to 10¹⁸ | O(log n) or a formula | anything that loops n times |

![For n = 10 to the power 5: O(log n) needs about 17 steps, O(n) 100,000, O(n log n) about 1.7 million, which all fit, while O(n squared) needs 10 to the power 10 and O(n cubed) 10 to the power 15, which do not](https://skills101.in/learn-img/career/constraints-complexity.svg)

**Worked example.** "Given an array of n ≤ 10⁵ marks, count pairs whose sum equals K." Checking every pair is n(n − 1)/2 ≈ 5 × 10⁹ steps for n = 10⁵ — too slow. Sorting and using two pointers, or a hash map of counts, takes about n log n ≈ 1.7 × 10⁶ or n = 10⁵ steps — fine. You decided this **before writing any code**, just from the constraint.

Also check the **value ranges**. If values go up to 10⁹ and you add two of them, the sum can reach 2 × 10⁹, which overflows a 32-bit `int` in Java and C++ (its maximum is 2,147,483,647). Use `long` / `long long`. Python integers do not overflow.

## 5. Passing hidden test cases

The sample tests shown in the problem are only a few easy cases. Your code is scored on **hidden test cases**, which usually include edge cases and the largest inputs. Before submitting, test these yourself with custom input:

- **smallest input:** n = 1, an empty string, a single element;
- **equal values:** all elements the same;
- **negative numbers and zero**, if the constraints allow them;
- **already sorted** and **reverse sorted** input;
- **largest values**, to check overflow;
- **the exact output format:** spaces, new lines, uppercase or lowercase "YES".

A wrong output format fails every test case even when the logic is right, so copy the expected format exactly from the sample.

## 6. When you cannot solve it fully

Many platforms score coding questions by the **number of hidden test cases passed**, so a partly correct program can earn partial marks. (Some companies give marks only for a full pass; the instructions usually say which.) If the efficient solution does not come:

1. Submit a **correct brute-force** solution. It may pass all the small test cases.
2. Handle **special cases** you are sure about (for example, n = 1).
3. Improve the solution if time remains, and **resubmit**. Usually the last or the best submission counts; check the instructions.

A correct slow solution almost always scores more than a fast solution that crashes.

## Common mistakes

- Doing the system check five minutes before the test, or not at all.
- Starting the first problem without reading the others, then running out of time on the hardest one.
- Ignoring the constraints and writing an O(n²) solution for n = 10⁵.
- Testing only with the sample input, then failing hidden cases on n = 1 or large values.
- Printing extra text like "Answer:" or debug lines that break the output format.
- Forgetting to press **Submit** on the last problem before the timer ends.

## Quick recap

- Prepare the system and room a day early; plug in the charger and keep a hotspot ready.
- Follow proctoring rules: stay in full screen, alone, on camera, without a phone.
- Read everything first, solve the easiest coding problem first, keep MCQs moving.
- Constraints decide the algorithm: about 10⁵ means O(n log n) or better.
- Test edge cases and the output format before submitting; use `long` for big sums.
- If stuck, submit a correct brute-force solution for partial marks, then improve it.


Practice quiz and free certificate: https://skills101.in/learn/career/career-online-coding-assessment