Barclays & HSBC: Data Scientist
Barclays & HSBC: Data Scientist / Data Science Intern Interviews (2025–26). Rounds, real reported questions and model answers, compiled from public candidate reports (sources at the end). Practice mode hides every answer: say your answer first, press Show answer, then rate yourself. Use 🔁 Review again to build your revision list and 🎲 Random question for a quick drill.
About this interview
Compiled from public candidate reports: four Barclays Data Scientist reports (New York, May 2025, offer; a referral with 4 rounds covering ML, GenAI, RAG, MCP and agentic AI, May 2026, offer declined; Pune, February 2026) and an HSBC Data Science / Software Engineering intern report (Bengaluru campus, September 2025). The questions are paraphrased, and the model answers are written by EasyLearnSpace.
| Barclays | HSBC | |
|---|---|---|
| Role | Data Scientist | Intern – Data Science / Software Engineering |
| Rounds | 3 technical (2 easy Python problems + discussion; ML / GenAI / projects) + managerial. Others: culture → technical (SQL HackerRank) → HM | Psychometric test (45–50 questions) → on-campus technical |
| Reported topics | Python, SQL, detailed ML algorithms, RAG, MCP, agentic AI, resume projects, prioritising urgent tasks | pandas merge + plot, palindrome, reverse a substring, character frequency, RANK(), UNION vs UNION ALL, joins |
| Outcomes | 2 offers (1 declined); 2 not selected | Not selected |
01Rounds at a glance
- Barclays: practical Python/SQL, then discussions of ML and GenAI depth. Cultural fit is weighted heavily.
- HSBC (campus): pandas, strings and SQL fundamentals, plus motivation questions ("why ML/AI?").
02Questions and model answers
SELECT name, salary,
ROW_NUMBER() OVER (ORDER BY salary DESC) AS rn, -- 1,2,3,4 (unique)
RANK() OVER (ORDER BY salary DESC) AS rk, -- 1,2,2,4 (gaps after ties)
DENSE_RANK() OVER (ORDER BY salary DESC) AS drk -- 1,2,2,3 (no gaps)
FROM employees;
- Add
PARTITION BY deptfor per-group rankings, e.g. the top 3 salaries per department.
- UNION combines results and removes duplicates, which needs a sort or hash, so it is slower.
- UNION ALL keeps all rows, including duplicates, and is faster.
- Both require the same number of columns with compatible types. Use UNION ALL unless you truly need deduplication.
import pandas as pd, matplotlib.pyplot as plt
orders = pd.read_csv("orders.csv"); customers = pd.read_csv("customers.csv")
df = orders.merge(customers, on="customer_id", how="left", validate="many_to_one")
monthly = (df.assign(month=pd.to_datetime(df.order_date).dt.to_period("M").astype(str))
.groupby(["month", "segment"]).amount.sum().unstack(fill_value=0))
monthly.plot(kind="line", marker="o", figsize=(8, 4), title="Revenue by segment"); plt.tight_layout(); plt.show()
- Mention
how=options,validate=to catch duplicate keys, and checking for unmatched rows (indicator=True).
from collections import Counter
s = "Madam, I'm Adam"
clean = "".join(ch.lower() for ch in s if ch.isalnum())
print(Counter(clean)) # character frequencies
print(clean == clean[::-1]) # palindrome check -> True
def reverse_sub(s, i, j): return s[:i] + s[i:j+1][::-1] + s[j+1:] # reverse s[i..j]
- MCP (Model Context Protocol): a standard for exposing tools, resources and prompts to LLM apps through servers, so any compatible agent can discover and call them.
- In a bank:
- Wrap internal systems (customer lookup, transaction history, policy search) as MCP servers with strict authentication, scopes and audit.
- Agents compose them for tasks such as complaint triage or KYC refresh.
- Controls:
- Read-only by default.
- Human approval for any action that changes money or records.
- PII minimisation.
- Logging of every tool call.
- Treat tool outputs as untrusted (prompt-injection risk).
- Clarify impact and deadlines with stakeholders. Use an impact × urgency matrix.
- Communicate trade-offs early: "I can deliver A today and B tomorrow. Is that acceptable?"
- Unblock others first, time-box investigations, and automate repeated work.
- Example: "During quarter-end, I triaged three data requests by regulatory deadline, delivered the regulator's one first, and agreed new dates for the others. All three landed on time."
03How to prepare
- Barclays: easy–medium Python/SQL, ML algorithm details and GenAI architecture (RAG, MCP, agents). Prepare culture-fit stories.
- HSBC: pandas, string manipulation, SQL window functions and set operations, plus a clear "why data science" answer.
Sources
- Glassdoor: Barclays Data Scientist interview reviews (2025–26)
- Taro: HSBC Data Science intern, Bengaluru (Sep 2025)