InterviewLegend

Array and Number Puzzles

Alex Chen30 min readUpdated 108 real interview reports

Many Barclays OA papers start with an easier problem before the hard one. A BA3 campus OA set a 20-mark warm-up ahead of a 50-mark closer, and the problems here are about that size. Each fits in roughly twenty lines of code and needs nothing beyond a hash map or two arrays.

These short problems still cost people marks, because each one depends on reading a single operation exactly. In one, the statement rounds toward zero while Python's // floors, so a plain // fails every case with negative numbers. The others each have a similar detail in one line of the prompt. Find it before you write the loop.

The Barclays angle
Bank problems still check the arithmetic. One of the four was set in a US summer analyst OA and works on digits the way a bank's own systems do. Watch for overflow on these warm-ups too. A hundred thousand values near a billion won't fit in 32 bits, so sum in 64-bit integers. You usually pick your own language, and in Java or C++ getting the integer type right is up to you.

BarclaysPremium lesson · Coding round

The 4 Barclays problems are below.

  1. A Premium questionCoding · Easy
  2. A Premium questionCoding · Easy
  3. A Premium questionCoding · Medium

+ 1 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Barclays questions

$49 a year · all 100 companies · cancel anytime

From 108 Barclays reports, forum threads behind logins and write-ups in Chinese.

Had your Barclays interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Barclays interview guide

Know what Barclays asks before you walk in.

30 coding · 1 system design · 28 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.