Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio.
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 where the interviewer asked me 2 DSA based problems.



1. Buying a stock and then selling it is called one transaction.
2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again.
Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].
Output: 6
Explanation:
The maximum profit can be earned by:
Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3).
Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
Total profit earned will be (3 - 0) + ( 4 - 1) = 6.
The idea is to traverse the given list of prices and find a local minimum of every increasing sequence. We can gain maximum profit if we buy the shares at the starting of every increasing sequence (local minimum) and sell them at the end of the increasing sequence (local maximum).
Steps :
1. Find the local minima and store it as starting index. If not exists, return.
2. Find the local maxima. and store it as an ending index. If we reach the end, set the end as the ending index.
3. Update the solution and Increment count of buy-sell pairs.
4. Repeat the above steps till the end is not reached.



If ‘A’ is 13(1101) and ‘B’ is 7(0111), The number of bits that should be flipped is 2(0111).
For this question, it can be observed that there can be only two possible solutions for an alternate binary string. The resultant string will look like either of the two cases:
1. 010101…
2. 101010…
3.
Now, in order to find the minimum replacements, count the number of replacements to convert the string in type 1 and store it in variable count.
For type2, the number of replacements will be n-count (n is length of string).
So, the answer will be min(count, n-count).
To calculate the number of replacements for type 1, traverse the string and loop from i=0 to len-1. If 1 is present at even index positions or 0 is present at odd index positions, then we need to flip the bit, so update the count every time. The count after traversing the entire string will be the number of replacements required to convert the string to type 1.
Time Complexity : O(N)
Auxiliary Space : O(1)
Technical interview round where the interviewer asked me 2 DSA based problems.



Input: Consider the binary tree A as shown in the figure:

Output: [10, 5, 3, 7, 18, 25, 20]
Explanation: As shown in the figure
The nodes on the left boundary are [10, 5, 3]
The nodes on the right boundary are [10, 20, 25]
The leaf nodes are [3, 7, 18, 25].
Please note that nodes 3 and 25 appear in two places but are considered once.
The idea is to split the problem into 3 parts:
• Print the left boundary in a top-down manner.
• Print the leaf nodes in the same order as in the inorder traversal.
• Print the right boundary in a bottom-up manner.
Time Complexity : O(N)



Input: 'list' = [1, 2, 3, 4], 'k' = 2
Output: 2 1 4 3
Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.
All the node values will be distinct.
Recursion can be used to solve this problem. We reverse every group of k linked list nodes and attach it to the previous group.
Steps :
1) The first step is to check whether the Head is NULL or Not, if its NULL then we can directly return NULL,
2) If the Head is not NULL, then we need to check the length of Linked List starting from current Head.
3) If the length is less than k , then there is no need to reverse it and hence we can directly return head,
4) Else if its a multiple of K, then we have to reverse the K elements starting from current Head. While reversing keep track of the next node and previous node.
5) We will follow the same steps for the rest of the elements Recursively and link the two sub-lists.
Time Complexity : O(n)
Auxiliary Space : O(n/k)
Typical HR round where the interviewer asked behavioral problems.
1. What are technical challenges that you solved?
2. Where do you want to work & what interests you?
3. Why Info Edge?
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?