InterviewLegend

Trees & Grids

Alex Chen26 min readUpdated 108 real interview reports

Barclays runs its coding inside a timed online assessment on SHL, HackerRank, or HackerEarth, and a familiar structure is usually buried under a page of business narrative. Two of those stories come back again and again: cities joined by a Premium question, which is a tree, and a grid of numbers you scan for symmetry, which is a matrix problem in disguise.

Most of the work is decoding. Strip the scenario away and each algorithm underneath is short: one traversal to gather a local fact, then a combine step. What the assessment is checking is whether you can spot the structure through the prose, pick the right traversal, and then satisfy a fussy input and output format under a two-hour clock. Get the reading wrong and you solve the wrong problem cleanly.

BarclaysPremium lesson · Coding round

The 2 Barclays problems are below.

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

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.

7 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.