Capgemini coding interview
questions, leaked.
25 problems reported across recent Capgemini interviews. Top patterns: array, string, two pointers. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
Capgemini's assessment leans heavily on array and string problems, with 11 of 25 problems focused on arrays alone. You're looking at mostly easy difficulty (13 out of 25), but don't sleep on Two Sum, Remove Duplicates from Sorted Array, and Valid Palindrome. The real trap is the two hard problems at the end, which test trapping rain water and similar multi-pattern challenges. If you blank mid-assessment, StealthCoder runs invisibly during screen share and surfaces a working solution in seconds, so you're never stuck. Focus your prep on arrays and two-pointers first, then string manipulation.
Top problems at Capgemini
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Two Sum | EASY | 100.0 | 56% | Array · Hash Table |
| 02 | Reverse Degree of a String | EASY | 95.7 | 87% | String · Simulation |
| 03 | Number of Unique Subjects Taught by Each Teacher | EASY | 95.7 | 89% | Database |
| 04 | Remove Duplicates from Sorted Array | EASY | 83.5 | 60% | Array · Two Pointers |
| 05 | Count Elements With Maximum Frequency | EASY | 79.2 | 78% | Array · Hash Table · Counting |
| 06 | Best Time to Buy and Sell Stock | EASY | 73.9 | 55% | Array · Dynamic Programming |
| 07 | Add Two Numbers | MEDIUM | 67.1 | 46% | Linked List · Math · Recursion |
| 08 | Longest Common Prefix | EASY | 67.1 | 45% | String · Trie |
| 09 | Palindrome Number | EASY | 67.1 | 59% | Math |
| 10 | Valid Anagram | EASY | 57.5 | 67% | Hash Table · String · Sorting |
| 11 | Trapping Rain Water | HARD | 57.5 | 65% | Array · Two Pointers · Dynamic Programming |
| 12 | Find First and Last Position of Element in Sorted Array | MEDIUM | 57.5 | 47% | Array · Binary Search |
| 13 | Valid Palindrome | EASY | 57.5 | 51% | Two Pointers · String |
| 14 | Fibonacci Number | EASY | 57.5 | 73% | Math · Dynamic Programming · Recursion |
| 15 | Rotate Array | MEDIUM | 57.5 | 43% | Array · Math · Two Pointers |
| 16 | Nth Highest Salary | MEDIUM | 57.5 | 38% | Database |
| 17 | Exchange Seats | MEDIUM | 57.5 | 73% | Database |
| 18 | Longest Happy String | MEDIUM | 57.5 | 65% | String · Greedy · Heap (Priority Queue) |
| 19 | Median of Two Sorted Arrays | HARD | 57.5 | 44% | Array · Binary Search · Divide and Conquer |
| 20 | Subarray Sum Equals K | MEDIUM | 57.5 | 45% | Array · Hash Table · Prefix Sum |
| 21 | Balanced Binary Tree | EASY | 57.5 | 55% | Tree · Depth-First Search · Binary Tree |
| 22 | Longest Substring Without Repeating Characters | MEDIUM | 57.5 | 37% | Hash Table · String · Sliding Window |
| 23 | Move Zeroes | EASY | 57.5 | 63% | Array · Two Pointers |
| 24 | Reverse Words in a String | MEDIUM | 57.5 | 52% | Two Pointers · String |
| 25 | Coin Change | MEDIUM | 57.5 | 46% | Array · Dynamic Programming · Breadth-First Search |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Capgemini OA. The proctor cannot see it. Screen share cannot detect it. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoder- array11 · 44%
- string7 · 28%
- two pointers6 · 24%
- hash table5 · 20%
- dynamic programming4 · 16%
- math4 · 16%
- database3 · 12%
- recursion2 · 8%
- binary search2 · 8%
- simulation1 · 4%
The distribution is skewed toward foundational data structures. Arrays dominate (11 problems), strings appear in 7, and two-pointers shows up in 6. Hash-table and dynamic-programming each hit 4 to 5 problems, so they're secondary but not optional. The difficulty curve is forgiving until the end. Those two hard problems (Trapping Rain Water, likely one other) will test your ability to combine array, two-pointers, and dynamic-programming thinking in one go. If you've drilled Remove Duplicates, Two Sum, and Best Time to Buy and Sell Stock, you'll recognize the patterns. But when you hit a wall on Trapping Rain Water mid-assessment, StealthCoder is your hedge. It reads the problem on screen and delivers a solution in real time, invisible to the proctor. Spend your study time on arrays first, then strings and two-pointers.
Companies with similar patterns
If you prepped for Capgemini, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass Capgemini.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Capgemini interview FAQ
How many array problems should I solve before the assessment?+
At least 8 to 10. Arrays are 44 percent of Capgemini's problem set. Focus on Two Sum, Remove Duplicates from Sorted Array, Best Time to Buy and Sell Stock, and Rotate Array. These patterns repeat. Once you can solve them sub-two-minutes, you're ready.
Do I need to be strong at dynamic programming for this assessment?+
Not urgently. DP appears in only 4 problems and is mostly paired with array problems you'll see elsewhere. Best Time to Buy and Sell Stock is the most common DP-array hybrid. Drill that one, then move on to two-pointers and strings.
Is two-pointers worth drilling separately, or just within array problems?+
Drill it separately. Two-pointers shows up in 6 problems, including Valid Palindrome and Trapping Rain Water. Being able to move two pointers in sync without off-by-one errors saves time when the main challenge is algorithm logic, not pointer arithmetic.
What should I study first: strings or hash tables?+
Strings first. Seven of 25 problems involve strings, and most are easy difficulty. Valid Palindrome, Valid Anagram, and Longest Common Prefix are quick wins that build confidence. Hash-table problems often overlap with string and array problems anyway, so you'll see them again.
Should I worry about the two hard problems?+
Yes, but don't overweight them. Two out of 25 is manageable. If you solve the 13 easy problems cleanly and get 4 to 5 medium problems, you're well above passing. Use your last week to understand Trapping Rain Water's two-pointer and stack approach, then trust your basics.