0% found this document useful (0 votes)
7 views3 pages

Capgemini Coding Questions 2026

Uploaded by

tripathyananta69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Capgemini Coding Questions 2026

Uploaded by

tripathyananta69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CAPGEMINI TECHNICAL CODING QUESTIONS 2026

BATCH

1.​

se
2..
en
6S
ch
Te

Tech6Sense
3.

se
4.

en
6S

5. Maximum Consecutive Character


ch

Problem Statement:​
A string contains only lowercase letters. Find the first character that repeats consecutively
maximum number of times, and print that character along with its count.
Te

Example:​
​ Input:aabbbccccdd
​ Output: c4

6. Longest Balanced Binary Substring

Problem Statement:​
Given a binary string (e.g., "101001"), find the length of the longest substring that contains an
equal number of 0s and 1s.

Tech6Sense
7. Subarray Decreasing Length

Problem Statement:​
You are given an integer array. Find the length of the subarray starting from the first index
where the elements begin to decrease, until the decrease stops.
Input:
●​ An integer array of size n.​

Output:
●​ A single integer representing the length of the decreasing subarray.​

Example:​

se
Sample Input: 1 2 3 5 4
Sample Output: 2

8. Prime String Check


Problem Statement:​ en
If the length of a string is prime and the sum of the ASCII values of the string is also prime,
print "prime". Otherwise, print "non prime".
6S
Input:
●​ A single string.​

Output:
●​ Print "prime" if both conditions are prime, else "non prime".
ch
Te

Tech6Sense

You might also like