Two problems, 45 minutes, partial marks for partial solutions. A pragmatic strategy for maximising your score when the clock is against you.
Coding rounds are scored on partial correctness. That single fact should shape your entire strategy: a working brute force that passes 6 of 10 test cases beats a half-written "optimal" solution that passes none.
The first five minutes
Read both problems before writing anything. Start with the one you can fully see a path to. Jot the approach in a comment so a nervous brain does not lose the plot.
Bank the easy marks
- Write the brute force first and make it pass the sample cases.
- Handle the obvious edge cases: empty input, single element, all-equal values.
- Only then optimise — and only if time remains.
Common time-sinks to avoid
- Debugging by staring. Add a print, run, observe.
- Premature optimisation before anything works.
- Ignoring the constraints — they tell you the expected complexity.
Train the clock, not just the concept
Skill without pacing fails the round. Practise with a visible timer until the pressure feels normal — that is exactly what timed mocks on prephasz are for.
Put this into practice
Drill these exact patterns with adaptive practice, timed mocks and company-wise assessments on prephasz.
Start practising free