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.
In first round they asked me 2 coding questions where he asked me to code as close as possible to the actual one.



‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’.
‘ARR1’ = [3 4 6 9 10]
A simple approach would be to create a new arrays with size as sum of the sizes of both the arrays. Copy the elements of both the arrays in the new array and sort the array.
A space optimized approach also exists. While traversing the two sorted arrays parallelly, if we encounter the jth second array element is smaller than ith first array element, then jth element is to be included and replace some kth element in the first array.
Algorithm
1) Initialize i,j,k as 0,0,n-1 where n is size of arr1
2) Iterate through every element of arr1 and arr2 using two pointers i and j respectively
if arr1[i] is less than arr2[j]
increment i
else
swap the arr2[j] and arr1[k]
increment j and decrement k
3) Sort both arr1 and arr2



ARR=[‘hot’, ‘a’, ‘b’, ‘dog’] and query = (‘hot’, ‘dog’)
The answer, in this case, is 3 as the minimum distance between ‘hot’ and ‘dog’ in the given document is 3.
If any one of the words is not present in the document then your program must return ‘N’ which is the length of the document.
The idea is to traverse over all the elements in the array in two nested loops. Whenever we get occurrence of word1 or word2, take the minimum of answer and the current distance.
Time Complexity : O((N^2)*M), where N is the number of elements in the array and M is the maximum length of a string present in the array.
The idea is to get all the indices where ‘word1’ and ‘word2’ are present and store the indices in an array. Both the arrays will already be sorted as we found the indices by iterating over the array. Then we will use the two-pointer approach to find the minimum distance between ‘word1’ and ‘word2’.
Algorithm:
• Declare two arrays, that store the indices in which word1 and word2 are present, respectively.
• Declare a variable answer to store the maximum integer value.
• Iterate over the array ‘arr’:
o If the name of the current element is the same as ‘word1’, push the current index into the first array.
o If the name of the current element is the same as ‘word2’, push the current index into the second array.
• Initialize two pointers, ‘i’ and ‘j’, which point to the beginning of both the arrays, respectively.
• Execute a while loop with the condition i is less than the size of the first array and j is less than the size of the second array :
o Update ‘answer’ as the minimum of ‘answer’ and an absolute value of (i-j).
o If j > i, increment i by 1.
o Otherwise, increment j by 1.
• When it comes out of the loop, then return ‘answer’ as the final answer.
Then in the second round they asked a little about tree and told me to code 2 codes.



For the given binary tree

The level order traversal will be {1,2,3,4,5,6,7}.
A queue can be used to do level order traversal of the tree. For each node, first visit the node and then push its children nodes in the FIFO queue.
printLevelorder(tree)
1) Create an empty queue q
2) temp_node = root /*start from root*/
3) Loop while temp_node is not NULL
a) print temp_node->data.
b) Enqueue temp_node’s children
(first left then right children) to q
c) Dequeue a node from q.
Time Complexity: O(n) where n is the number of nodes in the binary tree
Space Complexity: O(n) where n is the number of nodes in the binary tree



Let the array 'ARR' be [1, 2, 3] and 'B' = 5. Then all possible valid combinations are-
(1, 1, 1, 1, 1)
(1, 1, 1, 2)
(1, 1, 3)
(1, 2, 2)
(2, 3)
Dynamic programming can be used to solve this problem.
Algorithm :
countWays(arr, m, N)
Declare and initialize count[N + 1] = {0}
count[0] = 1
for i = 1 to N
for j = 0 to m - 1
if i >= arr[j]
count[i] += count[i - arr[j]]
return count[N]
HR round with typical behavioral problems.
Q1. What are your strengths and weaknesses?
Q2.Why LinkedIn ?
Tip 1: Be sure to do your homework on the organization and its culture before the interview.
Tip 2: Employers want to understand how you use your time and energy to stay productive and efficient. Be sure to emphasize that you adhere to deadlines and take them seriously.
Tip 3: Talk about a relevant incident that made you keen on the profession you are pursuing and follow up by discussing your education.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?