0% found this document useful (0 votes)
39 views

Deloite Coding problem

Uploaded by

Pranjal chauhan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Deloite Coding problem

Uploaded by

Pranjal chauhan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Pattern of Deloitte Recruitment Exam :

Please be aware that this National Level Assessment has a 90-minute time limit and is divided into 4
sections, which are mentioned below :

Topics Number of Questions

Language Skills (English) 10 MCQs + 3 FUBs

General Aptitude 12 Reasoning + 10 Quants

Technical MCQs 30 Questions

Coding Questions 2 Questions

Deloitte Coding Questions

Question 1: Class Monitor

Problem Statement :

After JEE Mains, some students got admission into an engineering college. Now there is a class
consisting of such n students, and the HOD came to say it is time to select the class monitor. But He
never gets all of them at one time. So he brought a register, every time he gets someone with less
rank than the previous time he cut the name and wrote the name of the student and the rank.
For a given number of ranks he gets each time, you have to predict how many names are cut in the
list.

Constraints:
Number of Visiting<=10^9
ranks <=10000

Input Format:
Number of Visiting N in their first line
N space separated ranks the HOD gets each time

Output Format:
Number of ranks cut in the list

Sample Input:
6
437261

Sample Output:
3

C++

JAVA

Python
Question 2 : Corona for Computer

Problem Statement :

Every decimal number can be changed into its binary form. Suppose your computer has it’s own
CoronaVirus, that eats binary digits from the right side of a number. Suppose a virus has 6 spikes, it
will eat up 6 LSB binary digits in your numbers.
You will have a bunch of numbers, and your machine will have a virus with n spikes, you have to
calculate what will be the final situation of the final numbers.

Input Format:
First line, a single Integer N
Second line N space separated integers of the bunch of values as array V
Third line a single integer n, the number of spikes in Corona for Computer

Output Format:
Single N space separated integers denoting the final situation with the array v.

Sample Input:
5
12345
2

Output:
00011

Explanation:
5 is 101 in binary, when you cut the last two binary digits, its 1.

Question 3 : Help of Prepsters

Problem Statement :

Arnab has given me a challenge. I have to calculate the number of numbers which are less than a
certain value n, and have exactly k set bits in its binary form. As you are a Prepster like me, help me
write a code that will take input for n and k and give the expected output.

Constraints :
1<=n<=10000
1<=k<=10
Input Format :
First line containing n and k space separated
Output Format :
Number of numbers present in a single line

Sample Input:
72
Sample Output:
3
Explanation:
11,110,101 -> These three numbers.

Question 4: Momentum LinkedList


Problem Statement :

Ratul made a linked list, a list made of n nodes, where every node has two variables, the velocity and
the mass of a particle.
Since all the particles have the velocity in the same direction, find the total momentum of the entity
made by the particles from the linked list.

Constraints :
1<=n<=10000
1<=m,v<=100
Input format:
First line containing n, number of nodes
Then n lines containing the mass and the velocity space separated.
Output Format:
Single integer denoting the momentum

Sample Input:
4
13
24
23
45

Sample Output:
37

You might also like