The Intern hiring process for SRIB consisted of 3 rounds .(On Campus)
Round 1:
This was an online coding round which was held on CoCubes consisting of 3 problems with a time limit of 70 minutes.The probelms were quite easy and straightforward. Samsung usually asks repeated and general questions so it's always beneficial to take a look over past year questions.
Q1. Given a 2 Dimensional Matrix . Return a 2 Dimensional Matrix after sorting it Row wise i.e just sort each row of matrix in non-decreasing order(usually SRIB asks this question, I have seen this in few past year coding rounds as well).
Q2. It was a standard dp (Dynamic Programming) staircase climbing problem.A man can climp at most m steps. There are total n steps in the ladder. In how many different ways he/she can reach the top of the ladder.
Q3. Given an array of elements, find the maximum sum of the subsequence present in the array such that no two elements are consecutive.
I guess the problems were quite easy . For getting shortlisted one has to solve as fast as possible maintaining the readability of the code. In total 21 students were shortlisted for the next round.
Round 2:
This was an online technical interview round on skype. The interviewer was quite supportive and patient too.There were few connectivity issues in the middle of the interview .Sometimes he was not audible ,sometimes my voice was not audible to him. But overall he was very supportive.
The interview began with short introduction.I introduced myself and told him about my favourite topics.He just asked me on what my projects are based on and a general overview of that. This round was mainly based on DSA so he didn't ask me much about projects in this round and continued discussion on DSA. First of all,he asked some basic questions on stack and queues along with OOPs(theoretical questions ).Then he asked me whether I am comfortable with trees and graph .
Q1. Given a Binary Tree . Find the width of the tree.
This is a standard question of Tree. I gave 3 approaches for this probelm , he was quite satisfied and asked me to code the best one.
Q2. Find the intersection of two linked lists.
First of all I gave him O(n) approach with space complexity of O(n).Then he asked me to think of constant space solution. Then I gave him constant space approach. He was satisfied and asked to code it.
This round lasted for approx 45 minutes due to connectivity issues, but he was quite satisfied with my approach so I was selected for next Round.
P.S.
Even if the questions asked by the interviewer are easy and you know the best approach ,start with the least efficient approach and continue to most efficient one. This reflects your on the spot thinking ability.
Round 3:
This round was mainly focused on projects along with two good questions on coding.He started with my 1st project and step by step discussed all the projects mentioned in Resume.The discussion on projects went for 30 minutes and he was interested in my projects and told me that my projects are interesting and asked me what changes will I do so that these projects become useful in day to day life.
In last 15 minutes he asked two coding questions.
Q1. This was modification of famous Edit Distance Problem (Dynamic Programming).Given two strings.We have to make string A equal to string B in minimum cost. The allowed operations are Insert ,Delete and Replace.
He asked me for various cases like when the cost of insertion is higher than the cost of deletion and Replacement.(In general when the cost of any one operation is higher than the cost of the other two).
Q2. This was an ill-framed question. I didn't get the problem statement and he too agreed that I may not have worked in this field but he was just interested in listening my approach.I asked for repeating the question twice then he explained me the question with an example and then finally I was able to get the problem statement.
The question was:
Suppose sound travels in the form of nodes having some weights(positive or negative).The speed of the sound (v) is defined as the no.of nodes per second arriving at a point.We want to select a single node per second form a set of v nodes( arriving per second) such that after selecting t nodes for t seconds(selecting 1 node per second so t nodes for t seconds) the cost of t nodes is minimum.The cost of t nodes is defined as the sum of cost of all the t nodes.
Eg. Suppose we consider the speed of sound to be 26 i.e 26 nodes(from A to Z) per second having some cost.Let t=20 seconds. So we have to tell the efficient way to form a set of 20 nodes with minumum cost selecting one node per second out of 26 nodes available per second.
I was not getting the most efficient approach but he was just interested in my way of thinking .I told him that we can check all the possible solutions and will find the minimum cost solution by the process of backtracking. The discussion went for 15 minutes but at last he looked satisfied.
P.S. The question was not that much clear but he was just interested to know how the candidate approaches towards the solution.
Final verdict - Selected
Advice:
You must know about a single word mentioned in your resume especially in projects section. SRIB mainly focuses on projects and have a deep discussion on projects related stuff.
The interviewers are supportive so whenever stuck don't sit idle tell them where you are stuck or in which direction you are thinking , they will surely help you.