Deloitte interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Deloitte
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, Reasoning, Algorithms, Aptitude
Tip
Tip

Tip 1 : Practice daily do not take long and regular breaks
Tip 2 : Follow coding platforms for practice

Application process
Where: Leetcode
Resume Tip
Resume tip

Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration30 minutes
Interview date3 May 2022
Coding problem6

The interview was scheduled for the morning time. The environment was good.The interviewer was very kind and polite.

1. DBMS Questions

  1. Using which fixed roles, We can add or remove the user IDs?
  2. What is a database?
Problem approach

Tip 1 : Learn concepts of DBMS
 

2. Maximum Equality

Moderate
0/80
Asked in company
Deloitte

Ninja has an integer array 'A' of 'N' elements. He is allowed to perform at most 'X' operations on the array.

In one operation he can increment any one element of the array by 1. An operation can be performed repeatedly on the same element.

He wants to know the longest subarray he can obtain in which all the elements of the subarray are equal.

A subarray is a contiguous part of an array.

Example :
‘N’ = '7'
'X' = 5
The following line contains 'Ai', the 'ith' element from the left.
3 4 8 5 9 6 1

Assuming 0-based indexing, Ninja can perform the operations on 'i'=2, 'A[i]' = 8 once and 'i'=3, 'A[i]' = 5 four times to obtain [3 4 9 9 9 6 1].

Thus, the longest subarray with equal elements that can be obtained is [9, 9, 9] i.e. of length 3.
Problem approach

Step 1 : Using Array Index + Ternary Operator

Step 2 :  We can also take advantage of the fact that a garbage value is assigned to a local array in C by default. The idea is to use the first number as the array index and set the value to 0. Then, check if the array is set for the second number or not.

Try solving now

3. Angle Between Hour Hand And Minute Hand

Easy
15m average time
85% success
0/40
Asked in companies
MicrosoftSalesforceAmazon

Given the time in hours and minutes, you need to calculate the angle between the hour hand and the minute hand.

Note :
There can be two angles between the hour hand and minute hand, you need to print a minimum of two. Also, print the floor value of angle i.e. if the angle is 15.2, you need to print 15.
Problem approach

Step 1 : The idea is to consider the rate of change of the angle in degrees per minute. The hour hand of a 12–hour analog clock turns 360° in 12 hours, and the minute hand rotates through 360° in 60 minutes. So, we can calculate the angle in degrees of the hour hand minute hand separately and return their difference using the following formula:

Step 2 : Degree(hh) = H×(360/12) + (M×360)/(12×60)
Degree(mm) = M×(360/60)

Step 3 : Here, H is the hour, and M is the minutes past the hour. The angle should be in degrees and measured clockwise from the 12 o’clock position of the clock. If the angle is greater than 180°, take its difference with 360.

Try solving now

4. Distinct Query With Updates

Hard
60m average time
50% success
0/120
Asked in company
Deloitte

Given a sequence of n numbers a1, a2, ..., an, and a number of d-queries of the following types.

1. For each d-query (1, i, j),You have to return the number of distinct elements in the subsequence (i,j)i.e., ai, ai+1, ..., aj. where (1 ≤ i ≤ j ≤ n).
2. For each d-query (2, i, x), you have to update a[i]=x. where(1 ≤ x ≤ 10^6)
Problem approach

Step 1 : For Query 1:

Pair satisfy the required condition(2,3) as is the minimum possible product that can be achieved.

Step 2 : After Query 2:
A[4] = 3

Step 3 : Hence, the required answer is 1 + 3 = 4.

Try solving now

5. Boxes and chocolates

Ninja
55m average time
45% success
0/200
Asked in companies
AppleDeloitte

Kevin has three children and he wants to buy chocolates for them. The shopkeeper has ‘N’ boxes of chocolates (numbered from 1 to ‘N’). Each box has some amount of chocolates. If Kevin selects the “i-th” box for buying the chocolates then he must have to buy all the chocolates present in that box. Kevin wants to distribute an equal amount of chocolates among his children.

This problem is divided into 3 subproblems. You must have to solve all three subproblems.

FIRST:

You have to find the maximum number of ways in which Kevin can buy the chocolates if he is allowed to choose boxes in random order.

SECOND:

You have to find the maximum number of ways in which Kevin can buy the chocolates if he is only allowed to choose the consecutive boxes.

THIRD:

There are ‘Q’ queries given to you and each query can be of two types:

0 I V
1 L R

The first type has 0 as a first character that represents this is an update query in which you have to update the number of chocolates in the “Ith” box to ‘V’.

The second type has 1 as a first character that represents this is a range query in which you have to find the maximum number of ways in which Kevin can buy the chocolates in the range [L, R] if he is allowed to choose boxes in any order.

Note:

1. There is no need to maximize the number of chocolates bought by Kevin. 
2. Consider 1 based indexing for queries. There must be a single query of type 1. 
3. You have to take the modulo with 10^9 + 7 as the result can be very large.
Try solving now

6. Maximum Bitwise AND

Hard
0/120
Asked in company
Deloitte

Ninja is bored during his algorithm class and wants to play with numbers. He then starts quizzing people about this topic. It's your turn now!

You are given an array containing ‘N’ integers. You have to select more than one number from this array and calculate their bitwise AND, find the maximum value of bitwise AND that you can get.

For Example :
If 'N' = 6, 'ARR' = {2, 5, 5, 8, 5, 1}

You can select 'ARR[1]', 'ARR[2]' and 'ARR[4]' and you can get 'ARR[1]' & 'ARR[2]' & 'ARR[4]' = 5 & 5 & 5 = 5 as the maximum bitwise AND.
It’s not possible to get bitwise AND greater than 5 by selecting more than one integers from the array.
Try solving now
02
Round
Easy
HR Round
Duration15 minutes
Interview date15 Jun 2022
Coding problem1

The interview was scheduled for the morning time. The environment was good.

1. Basic HR Questions

1. How do you handle stress?
2. What are your greatest strengths? Weaknesses?
3. What isn’t on your resume?
4. If hired, when could you start?

Problem approach

Tip 1 : Give mock interviews
Tip 2 : Speak a lot in English

The approach is simple - Practice only English speaking skills

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 1 problems
Interviewed by Deloitte
1904 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 4 problems
Interviewed by Deloitte
1872 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by Deloitte
2456 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Deloitte
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115096 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35146 views
7 comments
0 upvotes