CONTENTS

    My Proven Approach to Acing the Barclays HackerRank Test

    avatar
    Seraphina
    ·October 15, 2025
    ·5 min read
    How you can ace the Barclays Hackerrank test in 2025 using my proven step by step approach

    Barclays HackerRank Test Questions

    After I applied for the Developer position at Barclays, I received the online assessment right away. There were two HackerRank questions, both relatively easy, with a total time limit of 60 minutes. However, the Barclays OA has two parts. After completing OA 1, there’s also OA 2. Below, I’ll share the questions I got from both rounds.

    I am really grateful for the tool Linkjob.ai, and that's also why I'm sharing my entire interview experience here. Having an invisible AI assistant during the interview is indeed very convenient.

    Question 1: Martin and Father’s Steps Problem

    Solution Approach:

    The first step is to generate the list of the father’s step positions. Starting from the initial position fatherPos, we add velFather each time for a total of steps positions:

    father_steps = [fatherPos + i * velFather for i in range(steps)].

    Next, we analyze Martin’s situation. His starting position is martinPos, and we need to find the velocity V2 that maximizes the number of overlapping positions F between Martin’s steps (martinPos + j * V2, where j starts from 1) and father_steps.

    Since we aim to maximize F, and if there are ties, choose the largest V2, we can iterate through all possible values of V2 (starting from 1 up to the point where Martin’s steps cover the father’s farthest position). For each V2, we generate Martin’s step list, count the intersection with father_steps, and record the maximum F and its corresponding V2.

    Question 2: Shortest Job First Scheduling

    Solution Approach:

    First, pair each task’s request time with its processing duration to form a task list. Then maintain a variable current_time, initialized to 0.

    At each step, select from all available tasks (those with request_time ≤ current_time) the one with the shortest processing time. If multiple tasks have the same duration, choose the one with the earliest request time.

    Compute the waiting time for that task (current_time - request_time), then update current_time to the task’s completion time (current_time + duration). Repeat this process until all tasks are completed. Finally, sum up all waiting times and divide by the number of tasks to obtain the average waiting time, rounded to two decimal places.

    Question 3: Student Group ID Problem

    Solution Approach:

    For each student, we need to check whether there exist students behind them with higher and lower PFR values.

    We can preprocess each student’s maximum and minimum PFR among the students behind them. For the i-th student, the list of PFR values behind them is listPFR[i+1:]; the maximum of that list is max_back, and the minimum is min_back.

    Then, based on the following rules, assign points:

    • If listPFR[i] < max_back and listPFR[i] > min_back, award 5 points.

    • If listPFR[i] < max_back and listPFR[i] <= min_back (i.e., there’s no smaller PFR behind), award 10 points.

    • If listPFR[i] >= max_back (i.e., there’s no higher PFR behind), award 15 points.

    Finally, iterate through all students, sum up the scores, and that total becomes the group ID.

    Barclays Hackerrank Test Format

    Overall Test Structure

    The Barclays HackerRank assessment focuses on evaluating candidates’ technical and analytical fit for fintech-related roles. The test covers programming fundamentals, algorithmic problem-solving in financial scenarios, and logic/data processing.

    The total duration is 60 minutes, with each section individually timed and non-returnable. During the assessment, window switching and use of external resources are strictly prohibited.

    Key Focus Areas

    Programming Fundamentals:

    This section evaluates coding proficiency and syntax fluency. Questions typically involve arrays, strings, and hash tables, such as removing duplicates and counting frequencies in arrays, formatting strings according to financial business rules, or performing fast transaction lookups using hash maps.

    Multiple mainstream programming languages are supported. Candidates must complete, debug, and pass all test cases within the time limit.

    Algorithmic Applications in Financial Scenarios:

    This part is closely tied to Barclays’ core business contexts. Common problems include shortest path scheduling for bank transfers, sliding window analysis on client transaction records, and dynamic programming for portfolio return optimization.

    It primarily assesses candidates’ ability to optimize algorithms and translate real-world business problems into computational models.

    Logic and Data Processing:

    This section focuses on logical reasoning and data interpretation within a financial context. Logical reasoning questions often involve conditional rule evaluation for banking risk control, while data processing tasks may present simulated customer asset reports or product return tables, requiring candidates to draw insights through computation or reasoning. Some questions involve basic statistical methods.

    Barclays Hackerrank Preparation and Interview Tips

    Weekly Goals

    I set goals for each week and tracked my progress, and I also broke down my study into smaller tasks so I could see improvement every day. Here’s how I organized my weekly goals:

    Resource Type

    Details

    Cognitive Ability

    4 full simulations, 5 study guides, 15+ additional practice tests by topic (Numerical, Inductive, Deductive, Reading)

    Personality Assessment

    Practice test (100+ questions) and study guide

    Mindset Assessment Study Guide

    Comprehensive guide available for preparation

    Each week, I kicked things off with a full mock test to see where I stood. Then I used study guides to brush up on concepts and did focused practice on specific topics. I spent extra time on numerical and logical reasoning, but I also made sure to work on my reading and pattern recognition skills. Every week, I tried to complete at least one personality test and go through the mindset guide. Keeping this routine really helped me stay consistent.

    Practice Tools

    Using the right tools made a huge difference in my preparation. Here are the ones I used most often:

    HackerRank:

    I used HackerRank to get comfortable with the test format and practice timed coding problems. It helped me simulate the real Barclays environment and track my performance across multiple attempts.

    LeetCode:

    LeetCode was my go-to for strengthening algorithms and data structures. I focused on easy-to-medium problems that matched the difficulty level of Barclays’ questions, especially arrays, strings, and hash maps.

    Linkjob.ai:

    Linkjob.ai helped me simulate mock interviews tailored to my resume and the specific role I applied for. It generated realistic questions and guided me with hints and structured answers, making my preparation more targeted and efficient.

    Answering Strategies

    When I sit down for the Barclays Hackerrank test, I always start by scanning the questions. I look for the ones I feel confident about and tackle those first. I keep my answers clear and direct. I focus on the main topics Barclays likes to test. Here’s a table that helps me remember what to prepare:

    Topics to Prepare

    Skills Evaluated

    Core Java

    Algorithms

    Collections

    Data Structures

    Stream API

    Problem Solving

    OOPS

    Technical Skills

    API

    Coding Skills

    FAQ

    Does the Barclays OA include anything other than coding questions?

    Yes. In addition to the two coding questions, there are three other parts: “Our Purpose, Values and Mindset”, “Tips for Performing Well in Your Assessments”, and “Barclays Values and Mindset Assessment.”

    You’ll have 5 minutes, 3 minutes, and 16 minutes to complete these sections, respectively. They mainly consist of multiple-choice questions, just answer them honestly based on your situation. However, try to avoid selecting overly negative options.

    What’s the best way to manage time during the 60-minute test?

    I’d suggest tackling the easier problem first to secure quick points. Then spend the remaining time on the more challenging one. Write a working solution first, even if it’s not fully optimized, and then refine if time allows. Always leave a few minutes to test your code against sample inputs to avoid losing points for minor format or syntax issues.