Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Coding Questions

Rating
-
Sold
-
Pages
12
Grade
A+
Uploaded on
26-11-2024
Written in
2024/2025

This is good coding questions for check your preprations level.

Institution
Course

Content preview

1:1 MOCK SESSION WWW.PRIMCECODING.IN 1:1 MOCK SESSION



Capgemini Coding CheatSheet

1. 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 :




G
Input :
aabbbbeeeeffggg




IN
Output:

a2b4e4f2g3

D
O
2. Problem Statement –

Write the code to traverse a matrix in a spiral format.
C
Sample Input

Input
E


5 4
IM



1 2 3 4

5 6 7 8

9 10 11 12
PR




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




3. Problem Statement –




Capgemini Coding CheatSheet
WWW.PRIMCECODING.IN 1:1 MOCK SESSION
1

, 1:1 MOCK SESSION WWW.PRIMCECODING.IN 1:1 MOCK SESSION


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

Input :

10

1233414512

Output :

1 occurs 3 times




G
2 occurs 2 times

3 occurs 2 times




IN
4 occurs 2 times

5 occurs 1 times

D
O
4. Problem Statement –
C
Write a function to solve the following equation a3 + a2b + 2a2b + 2ab2 +
ab2 + b3.
E


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




5. 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
3

42
40

12



Capgemini Coding CheatSheet
WWW.PRIMCECODING.IN 1:1 MOCK SESSION
2

Written for

Course

Document information

Uploaded on
November 26, 2024
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Only questions

Subjects

$26.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
mohd2125csit1129

Get to know the seller

Seller avatar
mohd2125csit1129 kiet
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
1 year
Number of followers
2
Documents
14
Last sold
1 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions