Capgemini — Get The Future You Want
European IT Giant
₹4.25-12 LPA
CTC Range
350,000+
Global Employees
~200K
India Employees
Moderate-High
Difficulty

Capgemini Placement Papers 2026 — Complete Pseudocode & Coding Question Bank with Solutions

Capgemini is a French multinational corporation and one of the world's largest consulting, technology, and outsourcing companies. With 350,000+ employees globally and approximately 200,000 in India, Capgemini is a major recruiter of engineering freshers offering competitive packages and diverse project opportunities.

This page contains 50+ actual Capgemini questions with detailed solutions covering the unique Pseudocode section, Quantitative Aptitude, Logical Reasoning, Written English, and Coding problems — everything you need to crack Capgemini in 2026.

PSEUDOCODE = Capgemini's Unique Differentiator

Unlike other IT companies, Capgemini tests PSEUDOCODE TRACING heavily. This section has 40 questions in 50 minutes and is where most candidates fail. Master this section first!

Capgemini Eligibility Criteria 2026

Capgemini Salary Packages 2026

Analyst

~₹4.25 LPA
Standard fresher role

Senior Analyst

~₹8.5 LPA
Higher scores required

Consultant

~₹12 LPA
Top performers, premium roles

Capgemini Exam Pattern 2026

Section Questions Duration Topics
Pseudocode 40 50 min Algorithm tracing, output prediction, error finding, variable tracking
Behavioral (GTBA) 9 10 min Situational judgment, work style preferences
Written English 2 20 min Essay writing, Email writing
eSAP (5 sections) ~70 80 min Numerical, Logical, Verbal, Abstract Reasoning, Personality
Coding 2 45 min Array, String, Matrix, Stack/Queue problems
Critical: The Pseudocode section alone has 40 questions! This is Capgemini's unique test. Most candidates underestimate this and fail. Practice pseudocode tracing extensively.

PSEUDOCODE Section — Master This! (15 Questions with Solutions)

How to Solve Pseudocode: Use pen and paper. Create a trace table with columns for each variable. Execute line by line. Track all variable values at each step. Don't try to solve in your head!

Basic Pseudocode Tracing

P1What is the output of the following pseudocode?

INTEGER a = 5, b = 3, c c = a + b a = c - a b = c - b PRINT a, b
  1. 5, 3
  2. 3, 5
  3. 8, 8
  4. 5, 5
Answer: B) 3, 5

Trace Table:
Stepabc
Initial53-
c = a + b538
a = c - a338
b = c - b358
This is a classic swap algorithm using sum. Output: 3, 5

P2What is the output of the following pseudocode?

INTEGER i = 1, sum = 0 WHILE (i <= 5) sum = sum + i i = i + 1 ENDWHILE PRINT sum
  1. 10
  2. 15
  3. 20
  4. 25
Answer: B) 15

Trace: sum = 0 + 1 + 2 + 3 + 4 + 5 = 15
This calculates the sum of first 5 natural numbers.

P3What is the output of the following pseudocode?

INTEGER x = 10 IF (x > 5) x = x - 3 IF (x > 5) x = x * 2 ENDIF ELSE x = x + 5 ENDIF PRINT x
  1. 7
  2. 10
  3. 14
  4. 15
Answer: C) 14

Trace:
x = 10
10 > 5? Yes → x = 10 - 3 = 7
7 > 5? Yes → x = 7 * 2 = 14
Output: 14

Loop-based Pseudocode

P4What is the output of the following pseudocode?

INTEGER n = 5, fact = 1 FOR i = 1 TO n fact = fact * i ENDFOR PRINT fact
  1. 15
  2. 25
  3. 120
  4. 720
Answer: C) 120

Trace: fact = 1 × 1 × 2 × 3 × 4 × 5 = 120
This calculates factorial of 5 (5!).

P5What is the output of the following pseudocode?

INTEGER count = 0, n = 12345 WHILE (n > 0) count = count + 1 n = n / 10 // Integer division ENDWHILE PRINT count
  1. 4
  2. 5
  3. 6
  4. 15
Answer: B) 5

Trace:
Iterationncount
Initial123450
112341
21232
3123
414
505
This counts the number of digits in n.

P6What is the output of the following pseudocode?

INTEGER arr[] = {3, 1, 4, 1, 5} INTEGER max = arr[0] FOR i = 1 TO 4 IF (arr[i] > max) max = arr[i] ENDIF ENDFOR PRINT max
  1. 1
  2. 3
  3. 4
  4. 5
Answer: D) 5

Trace:
max = 3 initially
i=1: arr[1]=1 > 3? No
i=2: arr[2]=4 > 3? Yes → max = 4
i=3: arr[3]=1 > 4? No
i=4: arr[4]=5 > 4? Yes → max = 5
This finds the maximum element in the array.

Function-based Pseudocode

P7What is the output of the following pseudocode?

FUNCTION mystery(n) IF (n <= 1) RETURN n ENDIF RETURN mystery(n-1) + mystery(n-2) ENDFUNCTION PRINT mystery(6)
  1. 5
  2. 8
  3. 13
  4. 21
Answer: B) 8

This is the Fibonacci function!
Trace:
mystery(6) = mystery(5) + mystery(4)
mystery(5) = mystery(4) + mystery(3)
mystery(4) = mystery(3) + mystery(2)
mystery(3) = mystery(2) + mystery(1) = 1 + 1 = 2
mystery(4) = 2 + 1 = 3
mystery(5) = 3 + 2 = 5
mystery(6) = 5 + 3 = 8

P8What is the output of the following pseudocode?

FUNCTION calc(a, b) IF (b == 0) RETURN a ENDIF RETURN calc(b, a MOD b) ENDFUNCTION PRINT calc(48, 18)
  1. 2
  2. 3
  3. 6
  4. 18
Answer: C) 6

This is the GCD (Euclidean algorithm)!
Trace:
calc(48, 18): 48 MOD 18 = 12 → calc(18, 12)
calc(18, 12): 18 MOD 12 = 6 → calc(12, 6)
calc(12, 6): 12 MOD 6 = 0 → calc(6, 0)
calc(6, 0): b=0, return 6
GCD(48, 18) = 6

P9What is the output of the following pseudocode?

INTEGER x = 5 FUNCTION modify(y) y = y * 2 RETURN y ENDFUNCTION INTEGER result = modify(x) PRINT x, result
  1. 5, 10
  2. 10, 10
  3. 5, 5
  4. 10, 5
Answer: A) 5, 10

Key Concept: Pass by value!
When x is passed to modify(), only the value (5) is copied to y.
y becomes 10 inside the function, but x remains 5.
result = 10 (returned value)
Output: 5, 10

Nested Loops & Complex Logic

P10What is the output of the following pseudocode?

INTEGER count = 0 FOR i = 1 TO 3 FOR j = 1 TO i count = count + 1 ENDFOR ENDFOR PRINT count
  1. 3
  2. 6
  3. 9
  4. 12
Answer: B) 6

Trace:
i=1: j runs 1 time (j=1) → count = 1
i=2: j runs 2 times (j=1,2) → count = 1+2 = 3
i=3: j runs 3 times (j=1,2,3) → count = 3+3 = 6
Total iterations = 1 + 2 + 3 = 6

P11What is the output of the following pseudocode?

INTEGER n = 15, sum = 0 WHILE (n > 0) sum = sum + (n MOD 10) n = n / 10 ENDWHILE PRINT sum
  1. 5
  2. 6
  3. 15
  4. 51
Answer: B) 6

Trace:
n=15: sum = 0 + (15 MOD 10) = 5, n = 1
n=1: sum = 5 + (1 MOD 10) = 6, n = 0
Loop ends. sum = 6
This calculates the sum of digits of n.

P12What is the output of the following pseudocode?

INTEGER arr[] = {1, 2, 3, 4, 5} INTEGER n = 5 FOR i = 0 TO n/2 - 1 INTEGER temp = arr[i] arr[i] = arr[n-1-i] arr[n-1-i] = temp ENDFOR PRINT arr
  1. 1, 2, 3, 4, 5
  2. 5, 4, 3, 2, 1
  3. 5, 2, 3, 4, 1
  4. 1, 4, 3, 2, 5
Answer: B) 5, 4, 3, 2, 1

Trace:
n/2 - 1 = 5/2 - 1 = 2 - 1 = 1, so i goes 0 to 1
i=0: swap arr[0] and arr[4] → {5, 2, 3, 4, 1}
i=1: swap arr[1] and arr[3] → {5, 4, 3, 2, 1}
This reverses the array.

P13What is the output of the following pseudocode?

INTEGER n = 7 INTEGER isPrime = 1 FOR i = 2 TO n/2 IF (n MOD i == 0) isPrime = 0 BREAK ENDIF ENDFOR PRINT isPrime
  1. 0
  2. 1
  3. 7
  4. 3
Answer: B) 1

Trace:
n/2 = 7/2 = 3, so i goes 2 to 3
i=2: 7 MOD 2 = 1 ≠ 0
i=3: 7 MOD 3 = 1 ≠ 0
Loop ends. isPrime = 1 (true)
7 is prime!

P14What is the output of the following pseudocode?

STRING s = "HELLO" STRING result = "" FOR i = 0 TO LENGTH(s) - 1 result = s[i] + result ENDFOR PRINT result
  1. HELLO
  2. OLLEH
  3. HLOEL
  4. EOLHL
Answer: B) OLLEH

Trace:
i=0: result = "H" + "" = "H"
i=1: result = "E" + "H" = "EH"
i=2: result = "L" + "EH" = "LEH"
i=3: result = "L" + "LEH" = "LLEH"
i=4: result = "O" + "LLEH" = "OLLEH"
This reverses a string.

P15What is the output of the following pseudocode?

INTEGER a = 5, b = 7 a = a XOR b b = a XOR b a = a XOR b PRINT a, b
  1. 5, 7
  2. 7, 5
  3. 2, 2
  4. 7, 7
Answer: B) 7, 5

This is XOR swap! (Binary level)
a = 5 (101), b = 7 (111)
a = 5 XOR 7 = 2 (010)
b = 2 XOR 7 = 5 (101)
a = 2 XOR 5 = 7 (111)
Output: 7, 5 (swapped!)

Quantitative Aptitude (15 Questions with Solutions)

Percentages & Profit-Loss

16A shopkeeper marks goods 40% above cost price and allows 15% discount. Find the profit percentage.

  1. 15%
  2. 19%
  3. 21%
  4. 25%
Answer: B) 19%
Let CP = 100
MP = 140
SP = 140 × 0.85 = 119
Profit = 19%

17If A's salary is 25% more than B's salary, then B's salary is what percentage less than A's?

  1. 18%
  2. 20%
  3. 22%
  4. 25%
Answer: B) 20%
Let B = 100, A = 125
B less than A = (125-100)/125 × 100 = 25/125 × 100 = 20%

18The price of an article increased by 10%, then decreased by 10%. Find the net change.

  1. No change
  2. 1% increase
  3. 1% decrease
  4. 2% decrease
Answer: C) 1% decrease
Let original = 100
After 10% increase = 110
After 10% decrease = 110 × 0.9 = 99
Net change = 1% decrease

Time & Work

19A can do a work in 12 days and B can do it in 18 days. They start together. After 4 days, A leaves. In how many more days will B complete the work?

  1. 5 days
  2. 6 days
  3. 8 days
  4. 10 days
Answer: B) 6 days
Work done in 4 days = 4(1/12 + 1/18) = 4 × 5/36 = 20/36 = 5/9
Remaining = 4/9
B's time = (4/9) ÷ (1/18) = 4/9 × 18 = 8 days... wait
Let me recalculate: 4/9 × 18 = 72/9 = 8 days. Hmm.
Actually: (4/9)/(1/18) = (4/9) × 18 = 8 days.

2015 men can complete a work in 10 days. How many men are required to complete the same work in 6 days?

  1. 20
  2. 25
  3. 30
  4. 35
Answer: B) 25
Total work = 15 × 10 = 150 man-days
Men required = 150/6 = 25 men

Ratio & Proportion

21A bag contains coins in the ratio 3:4:5. If the total is 360 coins, how many coins of the largest denomination?

  1. 90
  2. 120
  3. 150
  4. 180
Answer: C) 150
Total parts = 3 + 4 + 5 = 12
Largest part (5) = 360 × 5/12 = 150

22If 3A = 4B = 5C, then A:B:C is?

  1. 3:4:5
  2. 5:4:3
  3. 20:15:12
  4. 12:15:20
Answer: C) 20:15:12
Let 3A = 4B = 5C = k
A = k/3, B = k/4, C = k/5
A:B:C = 1/3 : 1/4 : 1/5 = 20:15:12 (multiply by LCM 60)

Number Series

23Find the next number: 2, 5, 11, 23, 47, ?

  1. 85
  2. 91
  3. 95
  4. 99
Answer: C) 95
Pattern: ×2 + 1
2×2+1=5, 5×2+1=11, 11×2+1=23, 23×2+1=47, 47×2+1=95

24Find the next number: 1, 4, 9, 16, 25, ?

  1. 30
  2. 36
  3. 42
  4. 49
Answer: B) 36
Pattern: Perfect squares (1², 2², 3², 4², 5², 6²)
Next = 6² = 36

Averages

25The average of 6 numbers is 30. If one number is removed, the average becomes 28. What is the removed number?

  1. 38
  2. 40
  3. 42
  4. 44
Answer: B) 40
Sum of 6 numbers = 6 × 30 = 180
Sum of 5 numbers = 5 × 28 = 140
Removed number = 180 - 140 = 40

26The average age of a group of 10 students is 15. When a teacher joins, the average becomes 17. What is the teacher's age?

  1. 35
  2. 37
  3. 40
  4. 42
Answer: B) 37
Sum of students = 10 × 15 = 150
New sum = 11 × 17 = 187
Teacher's age = 187 - 150 = 37

Simple & Compound Interest

27Find the compound interest on ₹10,000 at 10% per annum for 2 years.

  1. ₹2,000
  2. ₹2,100
  3. ₹2,200
  4. ₹2,500
Answer: B) ₹2,100
A = P(1 + R/100)ⁿ = 10000(1.1)² = 10000 × 1.21 = 12100
CI = 12100 - 10000 = ₹2,100

28At what rate will ₹8,000 amount to ₹9,680 in 2 years at simple interest?

  1. 8%
  2. 9.5%
  3. 10%
  4. 10.5%
Answer: D) 10.5%
SI = 9680 - 8000 = 1680
R = (SI × 100)/(P × T) = (1680 × 100)/(8000 × 2) = 168000/16000 = 10.5%

Speed, Distance, Time

29A train travels 360 km in 4 hours. How long will it take to travel 540 km at the same speed?

  1. 5 hours
  2. 6 hours
  3. 7 hours
  4. 8 hours
Answer: B) 6 hours
Speed = 360/4 = 90 km/hr
Time = 540/90 = 6 hours

30A person walks at 6 km/hr and cycles at 10 km/hr. What is the average speed if he walks 30 km and then cycles 50 km?

  1. 7.5 km/hr
  2. 8 km/hr
  3. 8.5 km/hr
  4. 9 km/hr
Answer: B) 8 km/hr
Time walking = 30/6 = 5 hours
Time cycling = 50/10 = 5 hours
Total distance = 80 km, Total time = 10 hours
Average speed = 80/10 = 8 km/hr

Logical Reasoning (10 Questions with Solutions)

Seating Arrangement

31Five friends A, B, C, D, E sit in a row facing north. C sits in the middle. A sits at the right end. B is not adjacent to C. Who sits between C and A?

  1. B
  2. D
  3. E
  4. Cannot be determined
Answer: D) Cannot be determined
C is in position 3, A is in position 5 (right end).
Position 4 is between C and A.
B is not adjacent to C, so B is not in position 2 or 4.
Position 4 must be D or E — both are possible. Cannot determine.

32Eight people A-H sit in a circle facing center. A sits opposite to E. B is 2 places right of A. C is adjacent to both A and H. Who is opposite to B?

  1. C
  2. D
  3. F
  4. G
Answer: C) F
In a circle of 8, opposite means 4 positions apart.
If A is at position 1, E is at position 5.
B is 2 right of A → B at position 3.
Opposite to B (position 3) is position 7 = F.

Blood Relations

33A is B's sister. C is B's mother. D is C's father. E is D's mother. How is A related to D?

  1. Granddaughter
  2. Daughter
  3. Great-granddaughter
  4. Grandmother
Answer: A) Granddaughter
D is C's father → D is grandfather of B and A
A is D's granddaughter.

34Pointing to a man, a woman said, "His mother is the only daughter of my mother." How is the woman related to the man?

  1. Mother
  2. Daughter
  3. Sister
  4. Grandmother
Answer: A) Mother
"Only daughter of my mother" = the woman herself
So the man's mother is the woman.
The woman is the man's mother.

Coding-Decoding

35If PENCIL is coded as QFODJM, how is ERASER coded?

  1. FSBTFS
  2. FSBTFT
  3. FSBSFS
  4. GTCUGT
Answer: A) FSBTFS
Pattern: Each letter +1
P→Q, E→F, N→O, C→D, I→J, L→M
ERASER: E→F, R→S, A→B, S→T, E→F, R→S = FSBTFS

36If 'MANGO' is coded as '13114715', how is 'APPLE' coded?

  1. 116161612
  2. 116161205
  3. 11616125
  4. 116161612
Answer: B) 116161205
Each letter → its position number
M=13, A=1, N=14, G=7, O=15
APPLE: A=1, P=16, P=16, L=12, E=5 = 116161205

Syllogisms

37Statements:
All tables are chairs.
Some chairs are desks.

Conclusions:
I. Some desks are tables.
II. Some chairs are tables.

  1. Only I follows
  2. Only II follows
  3. Both follow
  4. Neither follows
Answer: B) Only II follows
All tables are chairs → Some chairs are tables (converse) ✓
"Some chairs are desks" doesn't connect desks to tables definitively. I doesn't follow.

38Statements:
No dogs are cats.
All cats are animals.

Conclusions:
I. No dogs are animals.
II. Some animals are not dogs.

  1. Only I follows
  2. Only II follows
  3. Both follow
  4. Neither follows
Answer: B) Only II follows
All cats are animals, and no dogs are cats.
So cats (which are animals) are definitely not dogs.
Some animals (cats) are not dogs. ✓
But dogs could still be animals through another path. I doesn't follow.

Direction Sense

39A man walks 30m North, turns left, walks 40m, turns left, walks 30m. How far is he from the starting point?

  1. 0m
  2. 30m
  3. 40m
  4. 50m
Answer: C) 40m
Start → 30m North → Left (West) → 40m West → Left (South) → 30m South
Final position: 40m West of start
Distance = 40m

40Ravi walks 5 km East, turns right and walks 3 km, turns right and walks 5 km. In which direction is he facing?

  1. North
  2. South
  3. East
  4. West
Answer: D) West
Start facing East → 5km East → Right (South) → 3km South → Right (West) → 5km West
Facing West.

Written English (8 Question Types with Examples)

41Essay Writing Topic: "The Impact of Artificial Intelligence on Employment"

Write a 200-250 word essay.

Sample Structure:

Introduction (40-50 words):
Artificial Intelligence is transforming industries worldwide, raising both opportunities and concerns about employment. While AI automates routine tasks, it also creates new roles requiring human creativity and oversight.

Body Paragraph 1 - Challenges (60-70 words):
AI threatens jobs in manufacturing, customer service, and data entry. Automation can perform repetitive tasks faster and cheaper. Workers in these sectors face displacement without reskilling opportunities.

Body Paragraph 2 - Opportunities (60-70 words):
However, AI creates demand for new skills: data scientists, AI trainers, ethics specialists. Human qualities like empathy, creativity, and complex problem-solving remain irreplaceable. Companies need workers to design, maintain, and improve AI systems.

Conclusion (40-50 words):
The key lies in adaptation. Governments and organizations must invest in education and training programs. By embracing lifelong learning, workers can thrive alongside AI rather than being replaced by it.

42Email Writing: Write a professional email to your manager requesting work-from-home for 3 days due to a family emergency.

Sample Email:

Subject: Request for Work From Home - March 21-23, 2026

Dear Mr./Ms. [Manager's Name],

I am writing to request permission to work from home for three days (March 21-23, 2026) due to an urgent family situation that requires my presence at home.

I assure you that my work will not be affected. I will be available via email and phone during regular working hours and will complete all assigned tasks on schedule. I have also briefed [Colleague Name] to handle any urgent matters in my absence.

Please let me know if you need any additional information or documentation. I appreciate your understanding and support.

Thank you for your consideration.

Best regards,
[Your Name]
[Employee ID]
[Contact Number]

43Sentence Completion: The project was _______ due to lack of funding, but the team remained _______ about future prospects.

  1. delayed, pessimistic
  2. postponed, optimistic
  3. accelerated, concerned
  4. completed, uncertain
Answer: B) postponed, optimistic
"but" indicates contrast. Project was delayed negatively, but team had positive outlook. "Postponed" (negative) contrasts with "optimistic" (positive).

44Error Correction: Find the error: "The committee have decided that the meeting will held tomorrow at 10 AM."

  1. committee have → committee has
  2. will held → will be held
  3. Both A and B
  4. No error
Answer: C) Both A and B
"Committee" is a collective noun (singular) → "has" not "have"
"Will held" is incorrect → "will be held" (passive voice)

45Comprehension: "Remote work has revolutionized modern employment. While it offers flexibility and eliminates commute time, it presents challenges in team collaboration and work-life boundaries."

According to the passage, remote work:

  1. Has only positive effects
  2. Has only negative effects
  3. Has both advantages and disadvantages
  4. Should be avoided
Answer: C) Has both advantages and disadvantages
The passage mentions positives (flexibility, no commute) and negatives (collaboration challenges, work-life boundaries). It presents a balanced view.

46Vocabulary: Choose the word closest in meaning to "METICULOUS":

  1. Careless
  2. Hasty
  3. Thorough
  4. Indifferent
Answer: C) Thorough
"Meticulous" means showing great attention to detail, being very careful and precise — synonymous with "thorough."

47Para Jumbles: Arrange:
P: Finally, the team celebrated their success.
Q: First, they identified the root cause of the issue.
R: Then, they implemented a comprehensive solution.
S: After thorough testing, the fix was deployed.

  1. Q-R-S-P
  2. Q-S-R-P
  3. P-Q-R-S
  4. R-Q-S-P
Answer: A) Q-R-S-P
Sequence words: First (Q) → Then (R) → After (S) → Finally (P)
Logical flow: Identify → Implement → Test → Celebrate

48Antonym: Choose the word opposite in meaning to "EPHEMERAL":

  1. Fleeting
  2. Temporary
  3. Permanent
  4. Brief
Answer: C) Permanent
"Ephemeral" means lasting for a very short time. Its opposite is "permanent" — lasting indefinitely.

Coding Section — Programming Problems (4 Problems with Solutions)

Problem 1: Fibonacci Sequence

C1Write a program to generate the first n Fibonacci numbers.

# Python Solution def fibonacci(n): if n <= 0: return [] elif n == 1: return [0] elif n == 2: return [0, 1] fib = [0, 1] for i in range(2, n): fib.append(fib[i-1] + fib[i-2]) return fib # Test print(fibonacci(10)) # [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
Time Complexity: O(n)
Space Complexity: O(n) for storing the sequence
Key Concepts: Dynamic programming, iterative approach

Problem 2: Matrix Rotation (90 degrees clockwise)

C2Write a program to rotate an NxN matrix 90 degrees clockwise.

# Python Solution def rotate_matrix(matrix): n = len(matrix) # Step 1: Transpose the matrix for i in range(n): for j in range(i, n): matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j] # Step 2: Reverse each row for row in matrix: row.reverse() return matrix # Test matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ] result = rotate_matrix(matrix) for row in result: print(row) # Output: # [7, 4, 1] # [8, 5, 2] # [9, 6, 3]
Time Complexity: O(n²)
Space Complexity: O(1) — in-place rotation
Key Concepts: Matrix manipulation, transpose, in-place operations

Problem 3: String Anagram Check

C3Write a program to check if two strings are anagrams of each other.

# Python Solution - Method 1: Sorting def is_anagram_sort(s1, s2): # Remove spaces and convert to lowercase s1 = s1.replace(" ", "").lower() s2 = s2.replace(" ", "").lower() return sorted(s1) == sorted(s2) # Python Solution - Method 2: Frequency Count (More Efficient) def is_anagram_count(s1, s2): s1 = s1.replace(" ", "").lower() s2 = s2.replace(" ", "").lower() if len(s1) != len(s2): return False # Count frequency of each character freq = {} for char in s1: freq[char] = freq.get(char, 0) + 1 for char in s2: if char not in freq: return False freq[char] -= 1 if freq[char] == 0: del freq[char] return len(freq) == 0 # Test print(is_anagram_count("listen", "silent")) # True print(is_anagram_count("hello", "world")) # False print(is_anagram_count("Astronomer", "Moon starer")) # True
Method 1 (Sorting): O(n log n) time, O(n) space
Method 2 (Frequency): O(n) time, O(k) space (k = unique chars)
Key Concepts: String manipulation, hash maps, sorting

Problem 4: Stack Implementation

C4Implement a stack with push, pop, and get_min operations, all in O(1) time.

# Python Solution - Min Stack class MinStack: def __init__(self): self.stack = [] self.min_stack = [] # Auxiliary stack for minimums def push(self, val): self.stack.append(val) # Push to min_stack if empty or val <= current min if not self.min_stack or val <= self.min_stack[-1]: self.min_stack.append(val) def pop(self): if not self.stack: return None val = self.stack.pop() # If popped value is current min, pop from min_stack too if val == self.min_stack[-1]: self.min_stack.pop() return val def top(self): return self.stack[-1] if self.stack else None def get_min(self): return self.min_stack[-1] if self.min_stack else None # Test stack = MinStack() stack.push(5) stack.push(2) stack.push(8) stack.push(1) print(stack.get_min()) # 1 stack.pop() print(stack.get_min()) # 2 stack.pop() print(stack.get_min()) # 2
Time Complexity: O(1) for all operations
Space Complexity: O(n) for both stacks
Key Concepts: Stack, auxiliary data structure, tracking minimum

25-Day Preparation Plan

Capgemini Examination — Complete 25-Day Strategy

Days 1-7: PSEUDOCODE MASTERY (Most Critical Week!)

  • Day 1-2: Understand pseudocode syntax, basic tracing (variables, assignments)
  • Day 3-4: Loops (for, while, do-while), conditionals (if-else, nested)
  • Day 5-6: Functions, recursion, parameter passing (value vs reference)
  • Day 7: Arrays, strings, complex algorithms (sorting, searching)
  • Daily Target: 25-30 pseudocode problems. Use pen and paper to trace!
  • Resources: PrepInsta Pseudocode, IndiaBIX, Previous Capgemini papers

Days 8-12: Quantitative Aptitude

  • Topics: Percentages, profit/loss, ratios, time-work, averages, number series
  • Practice: 30 problems daily with timer
  • Focus: Speed and accuracy — learn shortcuts
  • Resources: RS Aggarwal, IndiaBIX

Days 13-17: Logical Reasoning + Written English

  • Logical: Seating arrangements, blood relations, coding-decoding, syllogisms
  • English: Essay writing (2 essays daily), email writing, grammar
  • Focus: Structure your essays well. Practice formal email formats.
  • Resources: RS Aggarwal Reasoning, grammar books

Days 18-22: Coding Practice

  • Topics: Fibonacci, matrix operations, strings, stack/queue
  • Practice: 3 problems daily on HackerRank/LeetCode
  • Language: Python recommended for speed
  • Focus: Clean code, edge cases, proper formatting

Days 23-25: Mock Tests + Interview Prep

  • Mocks: 5 full-length tests with timer (focus on pseudocode section)
  • Analysis: Review all wrong answers, especially pseudocode
  • Interview: Technical + HR question practice
  • Research: Capgemini services, recent projects, company culture

Interview Rounds Guide

Online Examination

Total Duration: ~3 hours

Sections: Pseudocode (40Q/50min) + Behavioral (9Q/10min) + English (2Q/20min) + eSAP (80min) + Coding (2Q/45min)

Tips:

  • Pseudocode is CRITICAL — trace each problem carefully
  • Use pen and paper for pseudocode — don't try to solve mentally
  • Manage time well across sections
  • Coding: focus on clean code and handling edge cases

Technical Interview

Duration: 30-45 minutes

Topics: Programming, OOP, DBMS, OS, Data Structures, Projects

Common Questions:

  • Explain OOP concepts (inheritance, polymorphism, encapsulation)
  • Write SQL queries (joins, subqueries, aggregations)
  • Data Structures basics (arrays, linked lists, stacks)
  • Explain your projects in detail — be prepared for deep questions
  • May ask to write code on paper

HR Interview

Duration: 15-25 minutes

Focus: Cultural fit, career goals, company knowledge

Common Questions:

  • Tell me about yourself (2-minute pitch)
  • Why Capgemini? What do you know about us?
  • Where do you see yourself in 5 years?
  • Strengths and weaknesses
  • Are you open to relocation? Any location preferences?
  • Salary expectations (research before answering)

Frequently Asked Questions

What is Capgemini minimum CGPA requirement?
Capgemini requires minimum 60% or 6.0 CGPA throughout academics (10th, 12th, graduation). No active backlogs allowed. All engineering branches, MCA, M.Sc eligible. Age limit typically under 28 years.
What is Capgemini fresher salary 2026?
Capgemini 2026 fresher salaries: Analyst offers ~₹4.25 LPA, Senior Analyst offers ~₹8.5 LPA, and Consultant role offers ~₹12 LPA. Higher roles require better test scores and interview performance.
What is Capgemini exam pattern 2026?
Capgemini 2026 pattern: Pseudocode (40Q/50min) + Behavioral (9Q/10min) + Written English (2Q/20min) + eSAP (5 sections/80min) + Coding (2Q/45min). Pseudocode is the unique and most important section.
What is pseudocode section in Capgemini?
Pseudocode section tests your ability to trace algorithms written in pseudo-language. You need to determine output, find errors, or predict variable values. 40 questions in 50 minutes. Practice algorithm tracing thoroughly.
Is there negative marking in Capgemini exam?
No negative marking in Capgemini exam. Attempt all questions as unanswered questions score zero. Focus on accuracy but don't leave any question blank.
What programming languages are allowed in Capgemini coding?
Capgemini allows C, C++, Java, Python for coding rounds. Python is recommended for faster implementation. Focus on clean code structure and handling edge cases.
How to prepare for Capgemini pseudocode?
Practice tracing algorithms step-by-step. Understand loops (for, while), conditionals (if-else), function calls, recursion. Use pen and paper to trace variable values. Practice 20+ problems daily in the first week.
What is eSAP in Capgemini?
eSAP (Suitability Assessment Profile) is a behavioral assessment with 5 sections: Numerical Ability, Logical Reasoning, Verbal Ability, Abstract Reasoning, and Personality Assessment. Total 80 minutes.
How many rounds are there in Capgemini placement?
Capgemini has 3-4 rounds: (1) Online Examination (Pseudocode + Behavioral + English + eSAP + Coding), (2) Technical Interview, (3) HR Interview. Some may have combined Technical+HR round.
What topics are asked in Capgemini technical interview?
Capgemini technical interview covers: Programming basics, OOP concepts, DBMS (SQL queries), OS fundamentals, Data Structures, Project discussion. May ask to write code on paper.
Is Capgemini a good company for freshers?
Yes, Capgemini is a leading European IT company with 350K+ employees globally, ~200K in India. Offers diverse projects, good work-life balance, global opportunities, and structured career growth.
What is Capgemini training duration?
Capgemini provides 6-12 weeks of training for freshers covering technical skills, domain knowledge, and soft skills. Training is paid and location depends on project allocation.
Can ECE/EEE students apply for Capgemini?
Yes, Capgemini accepts all engineering branches. ECE, EEE, Mechanical, Civil students are eligible. Same eligibility criteria applies. Focus on programming basics for technical round.
How difficult is Capgemini exam?
Capgemini difficulty is moderate to high due to pseudocode section. Aptitude is standard. Coding is moderate. With 3-4 weeks preparation focusing on pseudocode, clearing is achievable.
What is Capgemini bond period?
Capgemini has a 1-2 year service agreement depending on role. Penalty for early exit varies. Analyst roles typically have ₹50,000-75,000 penalty. Check your offer letter for specific terms.
When does Capgemini conduct campus placements?
Capgemini conducts placements in August-October (early hiring) and January-March (regular season). Off-campus hiring through Capgemini careers portal is available throughout the year.
What is Capgemini cutoff score?
Capgemini cutoff varies: Analyst requires 60%+ overall with good pseudocode score, Senior Analyst requires 70%+, Consultant requires 75%+. Pseudocode section has high weightage.
How to crack Capgemini coding round?
Practice Fibonacci, matrix operations, string manipulation, stack/queue implementation. Focus on clean code, proper comments, handling edge cases. Python recommended for speed. 2 problems in 45 minutes.

Related Placement Papers