The coding questions candidates report from Deloitte's NLA test and technical interviews, with model answers, a worked example and a two-week plan.
Deloitte coding questions are mostly short, fundamentals-level problems. In the National Level Assessment (NLA), the online test Deloitte USI uses to hire freshers in India, candidates and prep sites describe two coding questions in a 30-minute section at the end of a 90-minute test, one easy and one moderate. The interview that follows asks for even less code: an anagram check, a majority element, swapping two numbers. Off-campus software engineer and HashedIn by Deloitte rounds go further, into graphs, dynamic programming and database design. None of this is official Deloitte material. It comes from candidate write-ups and prep sites, and each section says which.
For every stage from application to offer, and how Deloitte, EY, KPMG and PwC differ, see our guide to the Big Four interview process.
Which Deloitte test you are taking
"Deloitte coding round" means different things depending on how you applied. The reports fall into three routes.
- Route — What candidates report — Reported by
- NLA online test (freshers, India) — 90 minutes, proctored. English, aptitude and technical multiple-choice sections, then two coding questions in about 30 minutes. The coding section is described as covering languages such as C, C++, Java and Python. — PlacementPreparation; a 2023 LeetCode write-up
- NLA interview — 15 to 30 minutes. Resume, projects, OOP and DBMS basics, and one to three small coding tasks, in one 2026 report solved live on the HirePro platform with your screen shared. — GeeksforGeeks (published 2023); LeetCode (2023, 2023, 2026)
- Off-campus software engineer — One Hyderabad report, published in 2023: a 90-minute HackerEarth test with two coding questions and ten output-prediction questions, then three technical rounds (the last on system design) and a managerial round. — GeeksforGeeks (published 2023)
- HashedIn by Deloitte — An online round of two or three coding questions (one 2025 report: two DSA plus two SQL), then technical rounds with live coding and database design. — LeetCode (2025, 2025); GeeksforGeeks (2021)
HashedIn is a software engineering firm that Deloitte Consulting announced it was buying in December 2020, and candidates describe its rounds separately from Deloitte USI's. Weekday's guide adds that USI and consulting freshers both take Versant, an automated spoken English test of about 15 to 20 minutes.
The sources disagree on details, and the disagreements are useful. PlacementPreparation describes the NLA coding questions as dynamic-programming-based competitive problems. The 2023 LeetCode candidate rated the first question easy and the second moderate and finished both in under 20 minutes. Another analyst trainee, writing in 2023, recalled the whole NLA as "approximately 3 hours". Prepare for one easy and one medium problem, and take the duration and sections from your registration email or placement cell rather than from any guide, this one included.
What the coding round is really scoring
Two questions in 30 minutes leaves about fifteen minutes each, including reading time. That is enough for a clean solution to a problem you recognise and not much else, so the round mostly rewards speed on basics in one language you already know well.
The off-campus report published in 2023 is the most useful single data point here: the candidate fully solved one of the two questions, partly solved the other, a harder dynamic programming problem, and was still selected. One report proves nothing about cut-offs, but it does suggest the right tactic. Bank the easy question completely first, then get a working brute force on the hard one before you try to optimise it.
The interview is different. The coding tasks are small, so how you explain them carries most of the weight. In one 2023 write-up, the interviewer asked the candidate to code every approach they had considered for an anagram problem, not just the final one. The 2026 candidate wrote that they explained their logic while coding. For every easy problem below, have two approaches ready and be able to state the time and space cost of each.
The questions candidates report
NLA and off-campus online tests
Count the subarrays whose sum is odd. This appears on CCBP's list of coding questions asked in Deloitte, which says it draws on past NLAs but does not say which year or round each question is from. It is a good example of the style, because the obvious answer is too slow.
What it tests: whether you see that checking every subarray is O(n²) at best and look for something better.
The idea: a subarray from i to j has an odd sum exactly when the prefix sums at j and at i-1 have different parity. So walk the array once, keep counts of how many even and odd prefix sums you have seen, and each new prefix pairs with every earlier prefix of the opposite parity.
def count_odd_sum_subarrays(nums):
even, odd = 1, 0 # prefix sums seen so far; the empty prefix (0) is even
total, prefix = 0, 0
for x in nums:
prefix += x
if prefix % 2: # odd prefix pairs with every earlier even prefix
total += even
odd += 1
else: # even prefix pairs with every earlier odd prefix
total += odd
even += 1
return totalCheck it on [1, 3, 5]: the odd-sum subarrays are [1], [3], [5] and [1, 3, 5], and the function returns 4. On [2, 4, 6] it returns 0. It runs in O(n) time and O(1) space. The detail candidates miss is starting even at 1, for the empty prefix; without it every subarray that starts at index 0 is lost. In C or Java, use a long for the total, since the count grows with n², and remember that % on a negative number returns a negative remainder there, so test parity with prefix & 1 or prefix % 2 != 0 instead of comparing with 1.
Shortest path in a weighted graph. One of the two coding questions in that off-campus HackerEarth test. Use Dijkstra's algorithm with a min-heap: pop the closest unsettled node, relax its edges, and skip heap entries that are already out of date. It runs in O((V + E) log V). Say out loud that it requires non-negative edge weights.
A harder dynamic programming problem. The same test's other question, which the candidate did not describe further. CCBP's list suggests the level: longest increasing subsequence, and maximum subarray sum when you may delete one element (Kadane's algorithm with a second running value for "one element already deleted").
NLA technical interview
Are two strings anagrams? Reported in 2023 and again in a 2026 live coding round. Sorting both strings and comparing works in O(n log n), which is what the 2026 candidate did. Counting characters is O(n). Before writing either, ask whether case, spaces and punctuation count.
from collections import Counter
def is_anagram(a, b):
return len(a) == len(b) and Counter(a) == Counter(b)The natural follow-up is grouping a list of words into anagram families, using the sorted word (or its letter counts) as a dictionary key.
Find the majority element. From the same 2023 interview. A hash map of counts is the first answer. The better one is Boyer-Moore voting, O(n) time and O(1) space, with a second pass to confirm the candidate really appears more than n/2 times, since the vote alone returns a value even when there is no majority.
def majority(nums):
candidate, count = None, 0
for x in nums:
if count == 0:
candidate = x
count += 1 if x == candidate else -1
return candidate if nums.count(candidate) > len(nums) // 2 else NoneSwap two numbers without a third variable. One of two warm-up tasks in a 2023 NLA interview. Arithmetic (a = a + b; b = a - b; a = a - b) and XOR (a ^= b; b ^= a; a ^= b) both work. Mention that the arithmetic version can overflow with fixed-width integers in C or Java, and that in Python you would simply write a, b = b, a. Naming the trade-off is what lifts an easy question.
The fundamentals around the code. The same interviews asked about OOP, DBMS, the difference between a Python list and a dictionary, how tuples are implemented, and loading Excel data into pandas. The 2023 NLA candidate was questioned on C++, Java and MySQL because all three were on the resume. Treat every language on your resume as an invitation.
Off-campus and experienced rounds
Reverse a linked list, and explain it. From a 2024 software developer interview. Iterate with three pointers (previous, current, next) and handle the empty and one-node lists out loud. A 2025 HashedIn intern interview extended it to reversing in groups of k: before reversing each group, check that k nodes remain, and reconnect the previous group's tail to the new head.
Binary search, with its complexity. Same 2024 interview. Use lo <= hi with mid = lo + (hi - lo) // 2, which avoids overflow in fixed-width languages, and state O(log n) time. Have the off-by-one cases ready: an empty array, a target smaller than every element, and a target larger than every element.
Merge overlapping intervals. From the same off-campus report, where the candidate gave a brute-force answer. The expected one: sort by start, then extend the last merged interval while the next start is at or before its end. O(n log n) for the sort.
Kth largest element, as "production-level code". From a 2021 HashedIn SDE-1 coding round. A min-heap of size k gives O(n log k); quickselect gives O(n) on average. "Production-level" is the real test: validate k, name things clearly, and show the test cases you would write.
Valid parentheses. From the 2025 HashedIn intern interview. Push opening brackets and pop on each closing one, checking the pair matches. Ask whether an empty string counts as valid rather than assuming.
Sum of the numbers in a string, then the missing numbers. From a 2021 HashedIn on-campus interview: return 100 for "1abc2x30yz67", then find the one missing integer in 1 to n, then the two missing integers. For two, the total of the missing pair comes from the sum formula; one of them is at most half that total, so summing only the values up to that midpoint gives the smaller number.
def two_missing(nums, n):
pair = n * (n + 1) // 2 - sum(nums) # x + y
mid = pair // 2 # x <= mid < y
x = mid * (mid + 1) // 2 - sum(v for v in nums if v <= mid)
return x, pair - xSQL: the department with the highest average salary. Weekday's guide gives this as a USI technical question, and the 2025 HashedIn report had two SQL questions in its first round. GROUP BY department, AVG(salary), ORDER BY descending, LIMIT 1. The follow-up is ties: LIMIT 1 silently drops a second department with the same average, so say how you would return both.
A two-week plan
- Days 1 to 3: confirm the format and pick one language. Read your registration email for sections and timing. Use the language you will also defend in the interview.
- Days 4 to 7: strings and arrays. Anagrams, frequency counts, majority element, prefix sums, two pointers, Kadane's algorithm. Write each easy problem two ways and say the complexity of both.
- Days 8 and 9: linked lists, stacks and binary search. Reversal (including k-groups), cycle detection, valid parentheses, binary search edge cases.
- Days 10 and 11: one graph and one DP problem a day. BFS, Dijkstra, longest increasing subsequence. Aim for a working brute force inside 15 minutes before optimising.
- Day 12: two timed mocks. Two problems in 30 minutes, no pausing. Solve the easy one completely before touching the second.
- Day 13: interview rehearsal. Explain one project in two minutes, then talk through an anagram solution while typing, as you would with your screen shared.
- Day 14: review your misses. After solving a problem yourself, Verve AI's Coding Copilot can capture it from your screen; its Edge Case and Complexity quick actions show the inputs you did not test and the Big-O analysis.
Deloitte's own interview tips ask candidates to get clarification when a question is unclear, and that habit matters most on easy coding prompts, where the edge cases decide the score. For the HR and behavioral side, see our Deloitte question bank; for more problems at this level, our common LeetCode interview questions; and for fundamentals rounds, our technical round interview questions.
Sources
- NLA test pattern (90 minutes, sections, two coding questions in about 30 minutes, languages such as C, C++, Java and Python, dynamic-programming-based coding, proctored, no negative marking): https://www.placementpreparation.io/deloitte/syllabus-and-test-pattern/
- 2023 NLA write-up (90 minutes, 60 plus 30 for two coding questions, easy and moderate, solved in under 20 minutes, 30-minute interview on C++/Java/MySQL from the resume, swap two numbers without a third variable): https://leetcode.com/discuss/interview-experience/3537060/
- Deloitte USI analyst trainee, posted 2023 (NLA "approximately 3 hours", medium coding, OOP and DBMS, anagram with every approach coded, majority element): https://leetcode.com/discuss/interview-experience/3751633
- 2026 NLA interview (live anagram question on HirePro with screen shared, sorting approach, explaining while coding): https://leetcode.com/discuss/post/8332077/deloitte-nla-2026-interview-experience-b-1f0l/
- USI analyst trainee on GeeksforGeeks (15 to 20 minute technical interview, OOP, DBMS, Python list vs dictionary, tuples, pandas): https://www.geeksforgeeks.org/interview-experiences/deloitte-usi-interview-experience-for-analyst-trainee-off-campus/
- Off-campus software engineer, Hyderabad, published 2023 (HackerEarth test, 90 minutes, two coding plus ten output questions, shortest path, partly solved DP question, merge overlapping intervals, system design round, selected): https://www.geeksforgeeks.org/interview-experiences/deloitte-interview-experience-for-software-engineer-off-campus/
- 2024 software developer interview (binary search with complexity, reverse a linked list): https://www.geeksforgeeks.org/interview-experiences/deloitte-software-developer-interview-experience/
- CCBP list of coding questions asked in Deloitte, drawing on past NLAs (odd-sum subarrays, longest increasing subsequence, maximum subarray with one deletion): https://www.ccbp.in/blog/articles/deloitte-coding-questions-and-answers
- USI and consulting streams, Versant length, SQL highest average salary question: https://www.weekday.works/post/deloitte-interview-questions
- HashedIn SDE intern, 2025 (three DSA questions online, valid parentheses, linked list reversal in k-groups, database design): https://leetcode.com/discuss/interview-experience/6853345
- HashedIn backend role, 2025 (two DSA plus two SQL questions in round one): https://leetcode.com/discuss/interview-experience/7409063
- HashedIn SDE-1, 2021 (kth largest element as production-level code): https://www.geeksforgeeks.org/interview-experiences/hashedin-by-deloitte-interview-experience-for-sde-1-off-campus-experienced/
- HashedIn on-campus, 2021 (two coding plus one debugging question online, sum of numbers in a string, missing number and two missing numbers): https://www.geeksforgeeks.org/interview-experiences/hashedin-by-deloitte-interview-experience-on-campus-2021/
- Deloitte Consulting buying HashedIn (December 2020): https://pulse2.com/deloitte-buys-hashedin-technologies/
- Deloitte interview tips (get clarification): https://www.deloitte.com/ui/en/careers/join-deloitte/recruiting-tips/careers-interview-tips.html
- Coding Copilot screen capture and quick actions: https://docs.vervecopilot.com/features/coding-copilot
- Code examples (odd-sum subarrays, anagram, majority element, two missing numbers): written for this page and tested locally against a brute-force check and the cases described.
Ryan
CEO of Verve AI







