Capgemini Exceller Coding Questions 2025

Capgemini Exceller Coding Questions and Answers 2025

Capgemini Exceller Coding Questions round has been very important to the Capgemini Exceller selection process for 2025 graduates. This round is conducted on the Superset platform and includes 2 coding problems, which you must solve within 45 minutes. The purpose of this section is to test your programming skills, logical thinking, and overall problem-solving ability.

Below, we have provided sample Capgemini Exceller Coding Questions from previous years to help you understand the difficulty level and practice effectively.

Capgemini Coding Questions and Answers

Details for Capgemini Exceller Coding Round

Coding RoundImportant Information
Total no. of question2
Allotted Time45 mins
Section PropertyMandatory
DifficultyHigh


Capgemini Exceller has started asking Coding Questions, but it is asked in a special hiring where the package being offered is more than the normal hiring.

  • Package  offered for this post is 7.5LPA, and since the package being offered is comparatively higher than the normal hiring process, the selection process and test difficulties level are also higher than normal.
  • Coding Round is the second major stage of the Capgemini Exceller recruitment process and carries a high weightage in the overall selection. This round tests your problem solving ability, coding logic, and understanding of basic data structures.

Important Details:

  • Total Questions: 2
  • Difficulty Level: Easy to Medium
  • Time Allotted: 45 minutes
  • Languages Allowed: C, C++, Java
  • Python is NOT allowed in the Exceller drive.

Capgemini Exceller Recruitment Process 2025

  1. Online Assessment
    • Technical MCQs + Pseudocode
    • English MCQs
    • Game Based Cognitive Test
    • Behavioral / PowerSkills Assessment
  2. Coding Round
    • 2 Coding Questions
    • Languages allowed: Java, C, C++
  3. Technical Interview
  4. HR Interview

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Practice Questions for Capgemini Exceller Coding Round

Question 1:

Problem Statement –

You have write a function that accepts, a string which length is “len”, the string has some “#”, in it you have to move all the hashes to the front of the string and return the whole string back and print it.

char* moveHash(char str[],int n);

Example :

Sample Test Case

Input:

Move#Hash#to#Front

Output:

###MoveHashtoFront

Question 2

Problem Statement –

Capgemini in its online written test have a coding question, wherein the students are given a string with multiple characters that are repeated consecutively. You’re supposed to reduce the size of this string using mathematical logic given as in the example below :

Input :

aabbbbeeeeffggg

Output:

a2b4e4f2g3

Input :

abbccccc

Output:

ab2c5

Question 3

Problem Statement –

Write the code to traverse a matrix in a spiral format.

 

Sample Input 

Input 

5   4

1   2   3   4

5   6   7   8

9   10 11 12

13 14 15 16

17 18 19 20

Output 

1  2  3  4  8  12  16  20  19  18  17  13  9  5  6  7  11  15  12  14 10  

Question 4

Problem Statement –

You’re given an array of integers, print the number of times each integer has occurred in the array.

 

Example

Input :

10

1 2 3 3 4 1 4 5 1 2

 

Output :

1 occurs 3 times

2 occurs 2 times

3 occurs 2 times

4 occurs 2 times

5 occurs 1 times

 

Question 5

Problem Statement –

Write a function to solve the following equation a3 + a2b + 2a2b + 2ab2 + ab2 + b3.

Write a program to accept three values in order of a, b and c and get the result of the above equation.

Question 6

Problem Statement –

A function is there which tells how many dealerships there are and the total number of cars in each dealership.

Your job is to calculate how many tyres would be there in each dealership.

Input

4 2

4 0

1 2

Output

20

16

8

There are total 3 dealerships

dealerships1 contains 4 cars and 2 bikes

dealerships2 contains 4 cars and 0 bikes

dealerships3 contains 1 cars and 2 bikes

Total number of tyres in dealerships1  is (4 x 4) + (2 x 2) = 20

Total number of tyres in dealerships2 is (4 x 4) + (0 x 2) = 16

Total number of tyres in dealerships3 is (1 x 4) + (2 x 2) = 8

Prepare more coding questions....

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription

36 comments on “Capgemini Exceller Coding Questions 2025”


  • Soumya

    Q-2
    import java.io.*;
    public class ReduceLengthString {
    public static String Solution(String str){
    String s = “”;
    char a[] = new char[200];
    int count = 0;
    for(int i=0;i<str.length();i++){
    count = 0;
    for(int j=0;j 1){
    s = s+str.charAt(i);
    s = s+(count+””);
    }
    a[str.charAt(i)]++;
    }
    }
    return s;
    }
    public static void main(String args[]) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    System.out.println();
    String str = br.readLine();
    System.out.println(Solution(str));
    }
    }


  • 26

    Question 4

    import java.util.*;
    public class Main
    {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int [] arr = new int [10];
    int count, prev = 0;
    for (int i = 0; i < 10; i ++) {
    arr[i] = sc.nextInt();
    }
    Arrays.sort(arr);
    for (int i = 0; i < 10; i += prev) {
    count = 1;
    for (int j = i + 1; j < 10; j ++) {
    if (arr[i] == arr[j]) {
    count ++;
    }
    }
    prev = count;
    System.out.printf("%d occurs %d times", arr[i], count);
    System.out.println();
    }
    }
    }


  • 26

    Question 2

    public class Main
    {
    public static void main(String[] args) {
    String str = “aabbbbeeeeffggg”;
    int count, prev = 0;
    for (int i = 0; i < str.length(); i += prev) {
    count = 1;
    for (int j = i + 1; j < str.length(); j ++) {
    if (str.charAt(i) == str.charAt(j)) {
    count ++;
    }
    }
    prev = count;
    System.out.print(str.charAt(i));
    System.out.print(count);
    }
    }
    }


  • 26

    Question 1
    public class Main
    {
    public static void main(String[] args) {
    String str1 = new String(“M#ve#Hash#to#Fr#nt”);
    char [] arr = new char[str1.length()];
    for (int i = 0; i < str1.length(); i ++) {
    if (str1.charAt(i) == '#') {
    arr[i] = str1.charAt(i);
    }
    }
    String str2 = String.valueOf(arr);
    str1 = str1.replace("#", "");
    System.out.println(str2.concat(str1));
    }
    }


  • 26

    Question 4
    import java.util.*;

    public class Main {
    public static void main(String[] args) {
    int i, j, count = 0;
    ArrayList arr = new ArrayList();
    Scanner sc = new Scanner(System.in);

    for (i = 0; i < 5; i++) {
    arr.add(sc.nextInt());
    }

    for (i = 0; i < arr.size(); i++) {
    count=1;
    for (j = i + 1; j < arr.size(); j++) {
    if (arr.get(i).equals(arr.get(j))) {
    arr.remove(j);
    j –; // Adjust the loop index after removal
    count ++;
    }
    }
    System.out.printf("%d occurs %d times", arr.get(i), count);
    System.out.println();
    }
    }
    }


  • Rani

    Code for 2nd Que in Python
    s=input(“s= “)
    res=””
    c=1
    a=len(s)-1
    for i in range(len(s)-1):
    if s[i]==s[i+1]:
    c=c+1
    else:
    res+=s[i]+str(c)
    i=c
    c=1
    res+=s[a]+str(c)
    print(“\n”,res)


  • 19501A0570

    Question 6: simplified
    n=int(input())
    s=0
    for i in range(n):
    x,y=map(int,input().split())
    s=s+(x*4)+(y*2)
    print(s)


  • Epic

    l=list(map(int,input().split(” “)))
    l.sort()
    d=list(set(l))
    for i in d:
    print(i,”occurs”,l.count(i),”times”)


  • Asif Basheer

    import java.util.*;
    class Asif {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    LinkedHashMap mapp = new LinkedHashMap();
    for(int i = 0; iSystem.out.print(k+””+v));
    }
    }


  • dhariprasad143143

    problem-2
    s=input(“Enter the string:\n”)
    l1=list(s)
    l=[]
    for i in l1:
    if i not in l:
    l.append(i)
    x=l1.count(i)
    if x>1:
    l.append(str(x))
    n=”
    for i in l:
    n=n+i
    print(n)


  • John

    import java.util.*;
    public class Dealers {
    public static void main(String[] args) {
    int [][] a = {
    {4,2},
    {4,0},
    {1,2}
    };
    List ans = calc(a, 3);
    for(int i: ans)
    System.out.print(i+” “);
    }
    private static List calc(int a[][], int n){
    List ans = new ArrayList();

    for(int i=0; i<n; i++){
    int cars = a[i][0];
    int bikes = a[i][1];
    int tyres = (cars * 4) + (bikes * 2);
    ans.add(tyres);
    }

    return ans;
    }
    }