Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Technical Interview round with questions on DSA.


If the given matrix is:
[ [1, 2, 5],
[3, 4, 9],
[6, 7, 10]]
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
The brute force solution is to traverse the array and to search elements one by one. Run a nested loop, outer loop for row and inner loop for the column
Check every element with x and if the element is found then print “element found”. If the element is not found, then print “element not found”.
Efficient Approach : The idea here is to remove a row or column in each comparison until an element is found. Start searching from the top-right corner of the matrix. There are three possible cases :
1. The given number > the current number: This will ensure that all the elements in the current row are smaller than the given number as the pointer is already at the right-most elements and the row is sorted. Thus, the entire row gets eliminated and continues the search for the next row.
2. The given number < the current number: This will ensure that all the elements in the current column are greater than the given number. Thus, the entire column gets eliminated and continues the search for the previous column, i.e. the column on the immediate left.
3. The given number == the current number: This will end the search.
• Algorithm:
1. Let the given element be x, create two variable i = 0, j = n-1 as index of row and column
2. Run a loop until i = n
3. Check if the current element is greater than x then decrease the count of j. Exclude the current column.
4. Check if the current element is less than x then increase the count of i. Exclude the current row.
5. If the element is equal, then print the position and end.



Input: ‘str1’ = “abcjklp” , ‘str2’ = “acjkp”.
Output: 3
Explanation: The longest common substring between ‘str1’ and ‘str2’ is “cjk”, of length 3.
Naive Approach: The idea is to generate all the subarrays of the two given arrays and find the longest matching subarray.
Time Complexity: O(2^(N+M)), where N and M are the length of the arrays.
Efficient Approach:
The efficient approach is to use Dynamic Programming(DP). This problem is a modification of the Longest Common Subsequence(LCS) problem.
Let the input sequences are A[0..n-1] and B[0..m-1] of lengths m & n respectively.
Following is the recursive implementation of the equal subarrays:
Since common subarray of A[] and B[] must start at some index i and j such that A[i] is equals to B[j]. Let dp[i][j] be the longest common subarray of A[i…] and B[j…].
Therefore, for any index i and j, if A[i] is equals to B[j], then dp[i][j] = dp[i+1][j+1] + 1.
The maximum of all the element in the array dp[][] will give the maximum length of equal subarrays.
Time Complexity: O(N*M)
Auxiliary Space: O(N*M)
Technical Interview round with questions on puzzles.
What is the expected number of coin flips until you get 3 heads in a row?
Let X3 be the number of tosses required to observe three consecutive heads.
Notice that either a tail comes first (with probability 50%) or two consecutive heads come first ( with probability 25%) or a head comes first followed by a tail on the first two tosses (with probability 25%). These three possibilities form a partition (as they are disjoint and their union is the whole sample space). Also, notice that it is fairly easy to find the conditional expectation of X3 given any of these events in terms of the unconditional expectation of X3 .
If T , then E(X3|T)=1+E(X3).
If HH , then E(X3|HH)=0.5⋅3+0.5⋅(3+E(X3)) .
If HT , then E(X3|HT)=2+E(X3) .
Combining these three by multiplying each by its probability and adding gives the expected value we seek:
E(X3)=0.5⋅(1+E(X3))+0.25⋅(0.5⋅3+0.5⋅(3+E(X3)))+0.25⋅(2+E(X3))
This reduces to:
18E(X3)=74 ⟹ E(X3)=14
There is a box with 2 white balls and 8 black balls. The balls are drawn and then put back in the box. The player who draws a white ball first wins the game. Player A starts.
What is the probability the player A wins?
Let E denote the event that the first ball drawn is a white one. Then:
P(A wins)=P(A wins|E)P(E)+P(A wins|Ec)P(Ec)
Now realize that:
P(A wins|Ec)=1−P(A wins)
This because under condition Ec the game somehow starts over, but now with player B as the one who draws the first ball.
Defining p:=P(A wins) we come to the following equation in p:
p=1×1/5+(1−p)×4/5=1−4/5 * p
and find that:
p=5/9=0.5555…
If you roll a die n times, what is the expected value for the sum of the faces?
There are two things you need to know about in order to compute this expected value. First, the definition of expected value is E(X)=∑x⋅p(x) . For a die roll, this is 1⋅1/6+2⋅1/6+3⋅1/6+4⋅1/6+5⋅1/6+6⋅1/6=21/6 .
Second, expected value is linear, meaning that the expected value of the sum of random variables is the sum of their expected values. This means that if you roll n dice, the expected value of the sum of the faces is n times the expected value of a single face, or 21/6n .
Typical Managerial round.
Why do you want to join Goldman Sachs?
Walk me through your resume.
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?