Tip 1 : Having good mathematical skills and a good grasp of Probability will help you a lot.
Tip 2 : Have all your basics cleared of OOPS and data structures.
Tip 3 : Practice coding questions regularly to have good coding skills.
Tip 4 : Have at least one good project where you used Machine Learning or played with data.
Tip 5 : Solve a lot of puzzles
Tip 1 : Have at least one good project where you used Machine Learning or played with data.
Tip 2 : You must know everything thoroughly that you've written on your resume.
Tip 3 : Keep it simple, clean, and readable.
This was an MCQ + Coding round
18 questions of Logical Reasoning
5 questions of Mathematics
7 questions of Subjects
2 coding questions
Consider a country having 4 states numbered from 1 to 4. These 4 states are connected by 5 bidirectional roads given as :
1 --- 2 with cost = 8
2 --- 3 with cost = 6
3 --- 4 with cost = 5
1 --- 4 with cost = 2
1 --- 3 with cost = 4
The map of the country can be represented as:
Now, the best way to choose 3 roads is:
The cost of travelling from any state to all other states is 2 + 4 + 6 i.e. 12.
Used prims minimum spanning tree algorithm.
In the below map of Ninjaland let say you want to go from S=1 to T=8, the shortest path is (1, 3, 8). You can also go from S=1 to T=8 via (1, 2, 5, 8) or (1, 4, 6, 7, 8) but these paths are not shortest.
Used Floyd Warshall algorithm.
The interviewer was kind, chill, and helping. The interview was on Zoom.
Throw a dice, your score will the number that appears on the topmost face of the dice. Find the expected score. Then the question was extended to two throws, either you can keep the number appeared in the first throw or discard that and go for another throw. Then again the question was extended to three and 'n' throws.
Good knowledge of probability is needed
There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual speed of the horse in a race. Find out how many races are required to get the top 3 horses.
Try to eliminate as many horses as you can.
Find the number which when divided by 8, leaves remainder 7, when divided by 7, leaves remainder 6, when divided by 5, leaves remainder 4........ when divided by 2, leaves remainder 1.
Take LCM of 8, 7, 6, 5, 4, 3, and 2. Then subtract 1 from it.
1. Each coin has a value associated with it.
2. It’s a two-player game played against an opponent with alternating turns.
3. At each turn, the player picks either the first or the last coin from the line and permanently removes it.
4. The value associated with the coin picked by the player adds up to the total amount the player wins.
'N' is always even number.
Ninjax is as smart as you, so he will play so as to maximize the amount he wins.
Let the values associated with four coins be: [9, 5, 21, 7]
Let’s say that initially, you pick 9 and Ninjax picks 7.
Then, you pick 21 and Ninjax picks 5.
So, you win a total amount of (9+21), i.e. 30.
In case you would have picked up 7 initially and Ninjax would have picked 21 (as he plays optimally).
Then, you would pick 9 and Ninjax would choose 5. So, you win a total amount of (7+9), i.e. 16, which is not the maximum you can obtain.
Thus, the maximum amount you can win is 30.
Let the values associated with four coins be: [20, 50, 5, 10]
Let’s say that initially, you pick 10 and Ninjax picks 20.
Then, you pick 50 and Ninjax picks 5.
So, you win a total amount of (10+50), i.e. 60.
In case you would have picked up 20 initially and Ninjax would have picked 50 (as he plays optimally).
Then, you would pick 10 and Ninjax would choose 5. So, you win a total amount of (20+10), i.e. 30, which is not the maximum you can obtain.
Thus, the maximum amount you can win is 60.
1.You can discard the remaining N x M - K pieces.
2.You do not need to print anything. It has already been taken care of by our driver code. Just implement the given function and return the minimum cost of cutting the chocolate bar to get exactly ‘K’ pieces of chocolate for each query.
It depends if the value of n and m is odd or even.
Five questions on OOPS were asked :-
1. What is Smart Pointer?
2. Some basic questions involving bit manipulation.
3. What is Virtual function?
4. What is Abstract Class?
5. Other standard simple questions of OOPS.
Good knowledge of OOPS will help you get through this kind of questions.
The interviewer was kind, chill, and helpful. The interview was on Zoom.
Discussion on Machine Learning Projects followed by a thorough discussion on Regression and other models. Discussion on deciding the model for any dataset and related factors.
Given two hourglass of 4 minutes and 7 minutes, the task is to measure 9 minutes.
Step 1 : Start both hourglasses at the same time.
Step 2 : At 4 minutes 4 minutes hourglass runs out and flip it. 7 minutes hourglass is left with 3 minutes.
Step 3 : At 7 minutes 4 minutes hourglass is left with 1 minute. 7 minutes hourglass runs out and flip it.
Step 4 : At 8 minutes: 4 minutes hourglass runs out and 7 is filled with 6 minutes and 1 minute on the other side. Flip it as the sand is left with 1 minute.
Step 5 : At 9 minutes: 7 minutes hourglass becomes empty from above side.
1. X and Y should be greater than 0.
2. (X, Y) and (Y, X) are considered different solutions if X is not equal to Y, i.e. (X, Y) and (Y, X) will not be distinct if X=Y.
There are 2 ants sitting on diagonally opposite vertices of the same face of a cube. They can move in any direction and reach another vertex in one unit of time. They'll move indefinitely until they collide and die. Find the expected life time of ants.
Tip 1 : Observation and imagination.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What does the SQL function NOW() return?