InterviewLegend

Strings, Combinatorics & DP

Alex Chen30 min readUpdated 108 real interview reports

Two related skills sit in this corner of the Barclays assessment. One is enumerating every arrangement by hand, which is backtracking, and it shows up almost word for word as "print a Premium question from given characters." The other is the counting or optimising version of the same idea, which is dynamic programming, and it turns up in the technical round paired with an array problem. Both are recursion with a decision at each step, so learning them together pays off twice.

The intern online assessment adds a twist that shapes how you should write these: after the coding question it asks you to record a two-minute spoken explanation of your solution. That rewards a routine clean enough to narrate. Skip the dense one-liner. The same instinct helps in the technical round, where the recurring "optimise this code" framing is really asking you to turn an exponential recursion into a linear DP and say why it is faster.

What's inside
  • 2 problems, worked step by step
  • about 30 min

Premium lessonBarclays interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

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.