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.
Two coding questions were given in the first round to be solved in 60 minutes.


If we have A = [3, 5, 7, 9, 2, 6] and m = 5.
Difference of array elements with m : [2, 0, 2, 4, 3, 1].
Array after rearrangement : [5, 6, 3, 7, 2, 9].
A direct approach would be to use an additional empty array of size n, where n is the size of the input array. Manage two pointers, one at the starting index of the input array and another one at the endpoint. Copy the last element of the array first, in the additional array, then the first element of the array, and increment both the pointers one index further. Follow the same pattern unless the start pointer becomes less than or equal to the end pointer. This approach has a time complexity of O(n) and used O(n) auxiliary space.
To solve the question in O(1) auxiliary space, multiple modular tricks can be used to rearrange the array. Initialize the indices of the first max and first min elements as 0 and n-1 where n is the size of the array respectively. Then, iterate over the input array and store the maximum elements in a decreasing order at even places, Similarly, store the minimum elements of the input array in increasing order at odd places. The array thus obtained will be the resultant array.
Algorithm :
max_index : Index of remaining maximum element
(Moves from right to left)
min_index : Index of remaining minimum element
(Moves from left to right)
Initialize: max_index = 'n-1'
min_index = 0
max_element = arr[max_index] + 1 //can be any element which is more than the maximum value in array
For i = 0 to n-1
If 'i' is even
arr[i] += arr[max_index] % max_element * max_element
max_index--
ELSE // if 'i' is odd
arr[i] += arr[min_index] % max_element * max_element
min_index++



1. A binary tree is a tree in which each node has at most two children.
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Recursion can be applied in this problem. Maintain a variable k to store the distance. If the node is null or k <0 , return. If k==0, this is the node at distance k from the root node. So, print it. Make calls for left and right subtree and decrement the distance by 1 (k-1).
Time Complexity: O(n) where n is number of nodes in the given binary tree.
Space Complexity : O(height of the binary tree).
This was a technical round with questions based on DSA, DBMS, Computer Networking and project based questions.



For example, Pattern for ‘N’ = 4 will be.
1
232
34545
4567654
In pattern based programs, two things need to be taken care of : No. of lines and If the pattern is increasing or decreasing per line.
Pseudo Code :
printPattern(n) :
num = 1;
gap = n - 1;
for (j=1 to n , j++):
{
num = j;
for (i=1 to gap, i++)
print(" ")
gap --;
for (i=1 to j, i++)
{
print num
num++;
}
num--;
num--;
for (i=1 to i {
print num
num--;
}
print new line
}
What is web server and application server ?
Web Server: It is a computer program that accepts the request for data and sends the specified documents. Web server may be a computer where the online content is kept. Example :Resin
Application server: It encompasses Web container as well as EJB container. Application servers organize the run atmosphere for enterprises applications. Example : Web logic
How internet works?
There are two main concepts that are fundamental to the way the Internet functions: packets and protocols.
Packets: In networking, a packet is a small segment of a larger message. Each packet contains both data and information about that data. The information about the packet's contents is known as the "header," and it goes at the front of the packet so that the receiving machine knows what to do with the packet.
Protocols : In networking, a protocol is a standardized way of doing certain actions and formatting data so that two or more devices are able to communicate with and understand each other. Because all Internet-connected computers and other devices can interpret and understand these protocols, the Internet works no matter who or what connects to it.
Write query to find nth highest salary.
TOP keyword can be used to find the nth highest salary. By default ORDER BY clause print rows in ascending order, since we need the highest salary at the top, we have used ORDER BY DESC, which will display salaries in descending order. Again DISTINCT is used to remove duplicates. The outer query will then pick the topmost salary, which would be your Nth highest salary.
SQL query :
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP N salary
FROM #Employee
ORDER BY salary DESC
) AS temp
ORDER BY salary
Proper discussion on my projects that were mentioned in the resume. They usually ask to make class diagram, ER diagram of project etc.
Typical HR round with behavioral problems.
1. Firstly HR asked to introduce yourself
2. Why you want to join this company?
3. My family background, asked about hobbies, academic achievements
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.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

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?