Tip 1 : Be confident and try to communicate with the interviewer.
Tip 2 : Practice all the coding concepts.
Tip 1 : Have projects related to the skills mentioned in the job description.
Tip 2 : Be perfect with the things that you put on resume. If you feel not confident enough remove them from resume.
A time window of 3 days will be provided. But once the exam gets started you will only have 120 minutes to finish. Exam will be of 120 points. You have to score at least 80-85 to qualify for the next round. Two coding questions were given. One was based on arrays and one was based on strings. Difficulty level - medium



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Tip 1 : Read the problem statement carefully before starting to code.



If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
Consecutive count of every character in the input string is less than or equal to 9. You are not required to print anything. It has already been taken care of. Just implement the given function and return the compressed string.
Slots will be provided and one slot was chosen by me. Environment used was coderpad which will be shared with us and the interviewer. Interviewer was good and patiently cleared all my doubts.



You need to change in the given array/list itself. Hence, no need to return or print anything.



This can be solved using maps or by taking extra array(storing frequencies).
This round was 1st interview of superday(all interviews will be conducted on same day). Each round lasts for one hour. 2 interviewers will be there and are very supportive. Coderpad will be provided for coding the problem.



Bubble Sort implementation for the given array: {6,2,8,4,10} is shown below :-



For the given tree:

The path 1 -> 3 -> 7 produces the maximum i.e, 11.
I have solved this problem through recursion. I have discussed my approach with the interviewer and this discussion was good as it went on for 20minutes. He asked me all the edge case scenarios to check my code covers them or not. I have explained him all his cases and he satisfied.



For the given binary tree

The level order traversal will be {1,2,3,4,5,6,7}.
I was asked to code this question fast as we were running out of time. I have codes this in short time as I was aware of tree traversals. I have solved this using the height concept of tree.
This round was taken just after 1st round(10minutes break was provided). This was taken on zoom with the help of coderpad. This interview also had 2interviewers.



If any character is a ‘?’ we can replace that character with any other character.
If a character is a * we can replace * with any sequence of characters including the empty sequence.
Let str = “abc?" and pat= “abcd”
We return true as ‘?’ can be replaced with ‘d’ and this makes ‘str’ and ‘pat’ same.
I solved it with the help of frequency. Extra array was taken and stored all the frequencies and solved it.



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.
Can go through above link. My solution is also similar to the one in link.
There are 9 boxes and 36 balls. Can we arrange odd number of balls in every box?
3round of superday. Only 1 interviewer was present.


Let's say we have an 'ARR' = {1, 2, 3, 4}, so the possible complete
binary trees will be:
4 12
/ \ / \
1 8 6 4
/ \ / \
2 12 2 3
/ \ / \
3 4 1 2
Sum of non-leaf nodes = 24 Sum of non-leaf nodes = 20
So the required answer you have to return is 20.
This was 4th round. It is completely based on oops and core Java. It was like rapid fire as 2interviewers kept on asking questions one after the other.
All the oops concepts were asked. All the collection frameworks were asked and asked me to explain how hashmap works(algorithm). Thread questions were asked and I have no work experience in multi threading and I told the interviewer same and he didn't ask any from multi threading.
Tip 1 : Be thorough with all the oops concepts and examples.
Tip 2 : Don't mention any word which you don't know as your next question can be on the word that you said.

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?