Problem database last updated: June 20, 2025

BBarclays logo

Barclays Coding Interview Questions

18 problems · 7 Easy, 8 Medium, 3 Hard · Ranked #98 of 458

Difficulty breakdown

7 Easy

39% · avg 23%

8 Medium

44% · avg 59%

3 Hard

17% · avg 18%

Top topics

array
61.1%
string
22.2%
dynamic-programming
22.2%
sorting
16.7%
two-pointers
16.7%
depth-first-search
16.7%1.8x

Interview profile

Based on 18 reported problems, Barclays interviews are in line with industry averages - 17% Hard vs 18% overall.

Compared to the industry average, Barclays puts unusual emphasis on simulation (11.1% of problems, 2.6x the industry average), depth-first-search (16.7% of problems, 1.8x the industry average), heap-priority-queue (11.1% of problems, 1.8x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (61.1%), string (22.2%), dynamic-programming (22.2%), sorting (16.7%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 18 problems

Furthest Point From Origin

Solve

You are given a string moves of length n consisting only of characters 'L', 'R', and ''. The string represents your movement on a number line starting from the...

EasyVery Likely
stringcounting

Double Modular Exponentiation

Solve

You are given a 0-indexed 2D array variables where variables[i] = [ai, bi, ci, mi], and an integer target.

MediumVery Likely
arraymathsimulation

Mark Elements on Array by Performing Queries

Solve

You are given a 0-indexed array nums of size n consisting of positive integers.

MediumVery Likely
arrayhash-tablesorting

Count Submatrices with Top-Left Element and Sum Less Than k

Solve

You are given a 0-indexed integer matrix grid and an integer k.

MediumVery Likely
arraymatrixprefix-sum

Lexicographically Smallest Generated String

Solve

You are given two strings, str1 and str2, of lengths n and m, respectively. A string word of length n + m - 1 is generated by str1 and str2 if for each index 0...

HardVery Likely
greedystringstring-matching

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyLikely
arrayhash-map

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumLikely
arraytwo-pointerssorting

Valid Parentheses

Solve

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

EasyLikely
stringstack

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumLikely
arraydepth-first-searchbreadth-first-search

Maximum Employees to Be Invited to a Meeting

Solve

A company is organizing a meeting and has a list of n employees, waiting to be invited. They have arranged for a large circular table, capable of seating any nu...

HardLikely
arraydynamic-programmingdepth-first-search

Minimum Number of Refueling Stops

Solve

A car travels from a starting position to a destination which is target miles east of the starting position.

HardLikely
arraydynamic-programminggreedy

Isomorphic Strings

Solve

Given two strings s and t, determine if they are isomorphic.

EasyLikely
hash-tablestring

Climbing Stairs

Solve

You are climbing a staircase. It takes n steps to reach the top.

EasyLikely
mathdynamic-programmingmemoization

Lexicographical Numbers

Solve

Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order.

MediumLikely
depth-first-searchtrie

Palindrome Linked List

Solve

Given the head of a singly linked list, return true if it is a palindrome or false otherwise.

EasyLikely
linked-listtwo-pointersstack

Permutations

Solve

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

MediumLikely
arraybacktracking

Merge Sorted Array

Solve

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and num...

EasyLikely
arraytwo-pointerssorting

Maximum Subarray

Solve

Given an integer array nums, find the subarray with the largest sum, and return its sum.

MediumLikely
arraydivide-and-conquerdynamic-programming

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Barclays interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Barclays coding interview

Barclays interviews focus heavily on array, string, dynamic-programming problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Barclays interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Barclays ask in interviews?add

Barclays has been reported to ask 18 distinct coding problems. The most common topics are array, string, dynamic-programming. 7 are Easy difficulty, 8 are Medium, and 3 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Barclays coding interviews?add

Based on 18 reported problems, Barclays interviews are in line with industry averages - 17% Hard vs 18% overall. 44% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Barclays coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, dynamic-programming. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Barclays interview?

Simulate a real Barclays coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Barclays interview with AIarrow_forward