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

SDE - 1

SHL
upvote
share-icon
2 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Journey
The most important and basic thing I feel like one should do is practice DSA . practice as much DSA as you can second most imp thing is focus on your core subjects such as DBMS,OOPS,OS and also have a good knowledge about your projects.
Application story
I applied from the link provided by the college then there was a written online technical round, then a technical interview round.
Why selected/rejected for the role?
selected I guess the reason behind my selection was my honesty and my in depth knowledge of DSA.And also I had a good knowledge of my projects as well. and by keeping calm during the interview.
Preparation
Duration: 5 months
Topics: DSA-graph, trees, recursion, DP, hashmaps, strings, arrays, Subjects-OS, DBMS, Compiler, OOPs concept is most imp.
Tip
Tip

Tip 1 : Rather than learning new things first try to practice and grasp already learned thing.
Tip 2 : Always try to understand the concept before grasping anything.
Tip 3 : Never copy your project.

Application process
Where: Campus
Eligibility: no
Resume Tip
Resume tip

Tip 1 : Always include only those things in which you are good.
Tip 2 : Don't try to add so many languages (programming)

Interview rounds

01
Round
Medium
Online Coding Interview
Duration50 minutes
Interview date16 Sep 2022
Coding problem1

Timings were good I mean mine were at 5 PM some people also had at 8Pm but I guess no one had more late than this.
As the test was online so we had to sit in calm environment.
yes there was one round of interview and it was quite hard.

1. Chocolate Problem

Moderate
15m average time
85% success
0/80
Asked in companies
EcomExpressIBMMicrosoft

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Try solving now
02
Round
Hard
Face to Face
Duration60 minutes
Interview date24 Feb 2023
Coding problem1

This round was quite difficult they asked a lot of questions reagarding projects. Questions were also asked regarding web sockets but that was also part of my project so the only thing I want to say is for interview have a good knowledge of project.

1. Delete Node In BST

Moderate
10m average time
90% success
0/80
Asked in companies
AdobeSAP LabsMakeMyTrip

You have been given a Binary Search Tree of integers with ‘N’ nodes. You are also given data of a node of this tree. Your task is to delete the given node from the BST.


A binary search tree (BST) is a binary tree data structure that has the following properties:

• The left subtree of a node contains only nodes with data less than the node’s data.

• The right subtree of a node contains only nodes with data greater than the node’s data.

• Both the left and right subtrees must also be binary search trees.
Example:
For the given BST, if we want to delete the node with data 5 :

Input

The modified BST will be:

Ouput

Please notice that another valid answer is:

Output

Note :

1. The node which we want to delete will always be present in the given tree.

2. If after deletion the tree becomes empty, print -1.
Problem approach

If the root is NULL, then return root (Base case)
If the key is less than the root’s value, then set root->left = deleteNode(root->left, key)
If the key is greater than the root’s value, then set root->right = deleteNode(root->right, key)
Else check
If the root is a leaf node then return null
else if it has only the left child, then return the left child
else if it has only the right child, then return the right child
else set the value of root as of its inorder successor and recur to delete the node with the value of the inorder successor
Return

Try solving now

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
961 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6261 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2160 views
0 comments
0 upvotes