Barclays Previous Year Coding Questions and Hiring Process
Barclays runs a large technology presence in India out of Pune, Chennai, and Noida, and hires freshers for its Technology Analyst and Graduate Developer roles through the Technology Explorer Programme, a two year rotational graduate track, alongside a separate Expert Programme for specialist coding and data roles.
If you are preparing for Barclays, understanding the online assessment structure, the technical interview expectations, and the values based HR round will help you prepare efficiently. This guide covers the complete Barclays hiring process along with previous year coding questions asked in its online assessments and interviews.
Barclays Hiring Process
Here is the typical flow for Barclays fresher hiring through campus and off campus drives.
| Stage | What Happens | What They Are Looking For |
|---|---|---|
| A proctored test, around 60 to 90 minutes, covering technical MCQs on OS, DBMS, and computer networks, one SQL query question, and one to two DSA coding problems of medium difficulty. | Breadth across CS fundamentals and working code. |
| One or two rounds covering DSA, OOP concepts, SQL, operating systems, and a walkthrough of your resume and projects. Some drives merge technical and HR into a single round. | Depth of understanding and ability to explain your own code. |
| Behavioural and situational questions explicitly mapped to Barclays' RISES values, Respect, Integrity, Service, Excellence, and Stewardship. | Alignment with company values and genuine self reflection. |
Most campus drives complete all three stages within a single day. Passing the online assessment typically requires solving at least one coding question in full alongside clearing a cutoff on the MCQ section.
Assessment Pattern
Format: A proctored online test combining technical MCQs, one SQL question, and coding, generally completed in a single sitting.
Sections typically included:
- Technical MCQs: Operating systems, DBMS, computer networks, and Java or C++ output prediction questions.
- SQL Question: A single query task, such as filtering records or joining multiple tables.
- Coding Round: One to two problems, medium difficulty, in C, C++, Java, or Python.
Barclays Coding Round: What to Expect
The coding round at Barclays leans toward medium difficulty DSA problems mixed with digit and pattern based logic problems. Frequently reported topics include:
- Digit counting and pattern problems, such as counting occurrences of a specific digit across a range
- Array manipulation such as rotation and sorting a 2D matrix
- Classic algorithmic problems such as the Longest Increasing Subsequence
- String and sliding window based problems
- Basic programs written without relying on built in library functions, to test fundamentals directly
For hands on practice, use:
Technical Interview Focus Areas
Real questions reported by candidates in the technical interview round:
- Explain stacks, queues, and the difference between arrays and linked lists, including how indexing behaves differently.
- Explain or implement Merge Sort.
- Explain or implement Binary Search.
- Explain how a HashMap works internally, and describe where you have used one.
- What is the difference between a thread and a process.
- Explain garbage collection in Java.
- Explain the Producer Consumer problem.
- Explain the different types of SQL joins, and write two or three SQL queries live during the interview.
- Design a database schema for a given scenario.
- Explain client side versus server side concepts in web development.
- Walk through the software development life cycle using one of your own projects as an example.
- Explain object oriented programming concepts with real world applications from your projects.
- Difference between DML and DDL, with example commands for each.
- What is indexing and clustering in a database, and how would you implement them.
- Difference between a primary key, a foreign key, and a candidate key.
- Explain third normal form with an example.
- Difference between the UNIQUE and DISTINCT keywords in SQL.
- Difference between RANK and DENSE_RANK window functions, and when you would use GROUP BY instead.
- Explain the ACID properties of a database.
- Explain the layers of the OSI model and what each one does.
- What is a state machine.
- Difference between copying an object and comparing two objects.
- Why does Java not allow multiple inheritance, and what role do interfaces play instead.
- Difference between function overloading and overriding, and whether you can overload a method using only a different return type.
- How is a HashMap actually implemented internally.
- Suggest a data structure suited for searching efficiently across millions of records, and justify your choice.
HR and Values Interview Tips
Barclays' HR round is distinctive in that it explicitly maps behavioural questions to its RISES values, Respect, Integrity, Service, Excellence, and Stewardship. Come prepared with a specific real example for each value, not a generic answer. Common questions include:
- Give an example of a time you demonstrated Excellence.
- Give a real life example demonstrating Stewardship.
- Would you share your work credentials with a colleague while on paid vacation? An integrity focused scenario question.
- How would you handle a manager favouring a colleague they are personally connected to?
- How would you train a junior colleague who might end up outperforming you?
- How do you handle conflicts within a team?
- Tell me about yourself, beyond what is already on your resume.
- How would you contribute to Integrity in your day to day work.
- If you were made project lead and your team members were missing deadlines, what would you do.
- Why should we hire you, and what are your strong points and weak points.
- What is the difference between confidence and arrogance.
- What is your favourite subject, and what is your least favourite subject, and why.
- Do you prefer frontend, backend, or database work, and why.
- How have you grown since starting college, and how did you improve your communication skills.
- Have you taken on any leadership roles, and how do you interact with juniors.
- Do you feel recognised by your peers or seniors, and how do you balance projects, academics, and personal life.
Complete HR Interview Questions
Prepare two or three strong personal stories in advance and map each one to a RISES value before the interview, rather than trying to improvise a values based answer on the spot.
Resources to Prepare for Barclays
- Free Aptitude Mock Practice latest patterns and mock tests
- ATS Score Checker and Resume Optimizer
- Roadmaps
- Interview Questions
- Resume Templates
- Free Placement Materials (Google Drive)
- Interview Experience
Barclays Previous Year Coding Questions
Below is a list of Barclays previous year coding questions commonly reported by candidates in the online assessment and technical interview. Each question includes a problem statement, input and output format, and a sample explanation.
1. Count Occurrences of a Digit From 1 to N
Problem Statement:
Given a number n, count how many times the digit 3 appears while writing all numbers from 1 to n.
Input Format:
- An integer
n
Output Format:
- The total count of the digit 3 across all numbers from 1 to
n
Example:
Input: 14
Output: 2
2. Slope of a Number
Problem Statement: Given a number, traverse its digits from right to left and count how many times the digit sequence changes direction, forming a local maxima or minima.
Input Format:
- An integer
n
Output Format:
- The count of direction changes
Example:
Input: 1213321
Output: 2
3. Count Words in a Sentence
Problem Statement: Given a sentence, count the number of words in it.
Input Format:
- A string
s
Output Format:
- The word count
Example:
Input: Barclays hires freshers every year
Output: 5
4. Rotate an Array
Problem Statement:
Given an array and a number k, rotate the array to the right by k positions.
Input Format:
- An integer array
arrand an integerk
Output Format:
- The rotated array
Example:
Input: arr = [1,2,3,4,5,6,7], k = 3
Output: [5,6,7,1,2,3,4]
5. Sort a 2D Matrix
Problem Statement: Given a 2D matrix, sort all its elements in ascending order while keeping the same matrix shape.
Input Format:
- A 2D integer matrix
Output Format:
- The matrix with all elements sorted in ascending order, filled row by row
Example:
Input: [[9,1],[3,7]]
Output: [[1,3],[7,9]]
6. Longest Increasing Subsequence
Problem Statement: Given an array of integers, find the length of the longest strictly increasing subsequence.
Input Format:
- An integer array
arr
Output Format:
- The length of the longest increasing subsequence
Example:
Input: [10, 9, 2, 5, 3, 7, 101, 18]
Output: 4
7. Smallest String Combining Two Strings
Problem Statement: Given two strings of lengths L1 and L2, construct a resulting string of size L1 plus L2 minus 1 that combines characters from both strings in a way that produces the smallest possible result.
Input Format:
- Two strings
s1ands2
Output Format:
- The resulting combined string of length L1 + L2 - 1
Example:
Input: s1 = "abc", s2 = "bcd"
Output: abcd
8. Reverse a String Without Built-in Functions
Problem Statement: Given a string, reverse it without using any built in reverse or library string function.
Input Format:
- A string
s
Output Format:
- The reversed string
Example:
Input: hello
Output: olleh
9. Implement Merge Sort
Problem Statement: Given an array of integers, sort it using the merge sort algorithm.
Input Format:
- An integer array
arr
Output Format:
- The sorted array
Example:
Input: [5, 2, 8, 1, 9]
Output: [1, 2, 5, 8, 9]
10. Implement Binary Search
Problem Statement: Given a sorted array and a target value, find the index of the target using binary search, or return -1 if it is not present.
Input Format:
- A sorted integer array
arrand a target value
Output Format:
- The index of the target, or -1
Example:
Input: arr = [1,3,5,7,9,11], target = 7
Output: 3
11. Maximum Height of a Divisor Tree
Problem Statement: Given a number N as the root of a tree, each node branches into child nodes whose values are divisors of the parent, excluding 1 and the number itself. Find the maximum possible height of such a tree.
Input Format:
- An integer
N
Output Format:
- The maximum height of the divisor tree
Example:
Input: 36
Output: 3
12. Check if an Array Can Be Made Strictly Increasing
Problem Statement: Given an array, determine whether it can be made strictly increasing by decreasing at most one element by any non negative amount.
Input Format:
- An integer array
arr
Output Format:
"Yes"or"No"
Example:
Input: [1, 5, 3, 6]
Output: Yes
13. Count Inversions in an Array
Problem Statement:
Given an array, count the number of inversions, pairs of indices i and j where i < j but arr[i] > arr[j].
Input Format:
- An integer array
arr
Output Format:
- The total count of inversions
Example:
Input: [2, 4, 1, 3, 5]
Output: 3
14. Count Pairs Where x Raised to y Exceeds y Raised to x
Problem Statement:
Given two arrays X and Y, count the number of pairs (x, y) such that x raised to the power y is greater than y raised to the power x.
Input Format:
- Two integer arrays
XandY
Output Format:
- The count of valid pairs
Example:
Input: X = [2, 3], Y = [3, 2]
Output: 2
15. Find a Triplet With a Given Sum
Problem Statement: Given an array of integers and a target sum, determine whether there exist three elements in the array that add up to the target.
Input Format:
- An integer array
arrand a target sum
Output Format:
"Yes"or"No", or the triplet itself
Example:
Input: arr = [12, 3, 4, 1, 6, 9], target = 24
Output: Yes, (12, 3, 9)
16. Partition Problem
Problem Statement: Given an array of integers, determine whether it can be partitioned into two subsets such that the sum of elements in both subsets is equal.
Input Format:
- An integer array
arr
Output Format:
"Yes"or"No"
Example:
Input: [1, 5, 11, 5]
Output: Yes
17. Compare Two Dates Without Library Functions
Problem Statement: Given two dates, each with a day, month, and year, determine which date is later, without using any built in date library functions.
Input Format:
- Two dates, each as day, month, and year integers
Output Format:
- The later of the two dates
Example:
Input: date1 = 15/08/2024, date2 = 02/01/2025
Output: 02/01/2025
18. Sum of Numbers Not Divisible by N Minus Sum of Numbers Divisible by N
Problem Statement:
Given two integers m and n, calculate the sum of all numbers from 1 to m that are not divisible by n, then subtract the sum of all numbers from 1 to m that are divisible by n.
Input Format:
- Two integers
nandm
Output Format:
- The resulting difference
Example:
Input: n = 4, m = 20
Output: 90
19. Nth Valid Seating Arrangement With No Two Adjacent Marked Seats
Problem Statement: In an exam hall, students from group 1 cannot sit in two adjacent seats. Represent seating as a binary string where 1 marks a group 1 student, and find the nth valid arrangement of a given length with no two consecutive 1s.
Input Format:
- An integer
lengthand an integern
Output Format:
- The nth valid binary string of that length with no two consecutive 1s
Example:
Input: length = 3, n = 2
Output: 010
20. Minimum Button Presses to Reach a TV Channel
Problem Statement: Given your current channel, a target channel, some blocked channels, and buttons for individual digits, channel up, channel down, and last viewed channel, find the minimum number of button presses needed to reach the target channel.
Input Format:
- Current channel, target channel, and a list of blocked channels
Output Format:
- The minimum number of button presses required
Example:
Input: current = 10, target = 5, blocked = []
Output: 1
21. Count Duplicate Emails to Remove
Problem Statement: Given a list of email addresses, find how many entries are duplicates that need to be removed so that only the first occurrence of each email remains.
Input Format:
- A list of email address strings
Output Format:
- The count of duplicate entries to remove
Example:
Input: ["a@x.com", "b@x.com", "a@x.com", "a@x.com"]
Output: 2
22. Candy Store Buy One Get K Free
Problem Statement: A store sells N types of candy at different prices. For every candy you buy, you may take up to K additional candies of different types for free. Find the minimum and maximum amount you must spend to acquire all N candies.
Input Format:
- An array of candy prices and an integer
K
Output Format:
- The minimum and maximum total cost to buy all candies
Example:
Input: prices = [3, 2, 1, 4], K = 2
Output: Minimum = 3, Maximum = 7
23. Sum From 1 to N Using a Closed Form Formula
Problem Statement:
Given a number n, calculate the sum of all integers from 1 to n without using a loop, by applying a closed form formula.
Input Format:
- An integer
n
Output Format:
- The sum from 1 to
n
Example:
Input: 100
Output: 5050
At Last
Barclays tests solid CS fundamentals alongside medium difficulty DSA, and its HR round genuinely digs into how well you can connect your own experiences to its RISES values, so treat that round as seriously as the technical ones. Revise SQL joins, sorting algorithms, and array manipulation, and prepare specific personal stories for the values based questions well before your interview.
Join the Telegram group for more resources and discussions.