← All companies

Previous year questions

Capgemini

Frequently repeated DSA questions. Curated from reported interview rounds β€” 75 questions with the prompt, the intended approach, explanation steps and a full solution.

75 questions75 with solution code8 topic areas
Service-based

Capgemini’s hiring stages, and how to prepare with this bank

Capgemini hires freshers and experienced engineers through a multi-stage process: an aptitude and logical-reasoning test, a written or online technical section (pseudocode, output prediction, basic SQL), a technical interview, and an HR discussion. The coding portion is usually one or two approachable problems rather than a contest-style set, so clarity and correct edge-case handling beat clever tricks.

What the rounds actually test

  • Fundamentals carry more weight than exotic algorithms: loops, recursion, strings, arrays, and the OOP concepts you can explain in your own words.
  • Pseudocode and output-prediction questions reward reading code carefully β€” practise tracing a loop by hand, not just writing one.
  • The technical interview revisits your resume projects; be ready to explain a design decision and a bug you fixed.
  • SQL basics (joins, GROUP BY, subqueries) appear in the technical round for most profiles; the /learn/sql track pairs well with this bank.
  • Communication is scored. Narrate your approach before typing, and confirm the input format before you start.

A four-week preparation plan

  1. Week 1 β€” aptitude and pseudocode drills alongside the easiest array and string questions here.
  2. Week 2 β€” recursion, stacks and queues; trace each solution on paper before running it.
  3. Week 3 β€” SQL joins and grouping, plus the tree and graph questions in this bank.
  4. Week 4 β€” full mock rounds: aptitude, one coding question, then project and HR questions.

75 questions β€” the complete bank, grouped by topic area.

Trees15

Arrays10

Strings8

Stacks7

Graphs6

Dynamic Programming5

Backtracking5

Queues3

General16

Recommended resourcesAffiliate links Β· may earn us a commission

Recommended for learners

Classic DSA interview booksThe reference books interviewers themselves learned from β€” great next to the visualizers.See the books Structured coding coursesVideo courses that pair well with visual practice β€” pick one language and go deep.Browse courses Cloud hosting for side projectsShip the portfolio project that gets you hired β€” free credits for new accounts.Claim credits