InterviewLegend

Graphs and Geometry

Alex Chen35 min readUpdated 108 real interview reports

One Barclays intern OA had two questions, and both felt like Codeforces problems. Both were geometry, neither appears on LeetCode in that form, and both test careful case work more than any single algorithm.

The graph problem comes from an older 2022 paper. Every trip starts from the same place, so a single shortest-path run answers all of them. Some edges cost nothing, which rules out plain BFS.

The Barclays angle
Settle the edge cases in integers before any floating point. Hidden tests target shapes that touch, overlap or sit inside one another. Decide each case with squared distances and cross products on 64-bit integers, and use floating point only for the final answer. When a statement doesn't say how to treat a touching case, write the reading you chose in a comment.

BarclaysPremium lesson · Coding round

The 3 Barclays problems are below.

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

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.