Tip 1 : It's not about how many questions you practice, it's about how many types of questions you can solve. Example do the top questions for Amazon/Microsoft which you can find on leetcode.
Tip 2 : Try to relate everything you do to real life scenarios as software engineering is implementing those real life problems as a software/solution
Tip 3 : Have deep understanding of Computer Engineering fundamentals like OS and DBMS. This will help you in any technical interviews
Tip 1 : Express only the relevant information to your job in the resume
Tip 2 : The experiences/projects that you write should be explanatory without writing too much of it.
There were 3 questions. Difficulty level was easy to medium.
You will get 2-3 days to complete the assessment which can be given at any time according to you.


Input: ‘K’ = 3, ‘NEZUKO’ = ‘RP’, ‘ZENITSU’ = ‘R’
Output: 1 0
Game 1: ‘NEZUKO’ = ‘R’, ‘ZENITSU’ = ‘R’, Result = ‘Draw’.
Game 2: ‘NEZUKO’ = ‘P’, ‘ZENITSU’ = ‘R’, Result = ‘Nezuko won the game’.
Game 3: ‘NEZUKO’ = ‘R’, ‘ZENITSU’ = ‘R’, Result = ‘Draw’.
Approach: Let length of string a be n and length of string b be m. The observation here is that the games would repeat after n * m moves. So, we can simulate the process for n * m games and then count the number of times it gets repeated. For the remaining games, we can again simulate the process since it would be now smaller than n * m. For example, in the first example above, n = 2 and m = 1. So, the games will repeat after every n * m = 2 * 1 = 2 moves i.e. (Player2, Draw), (Player2, Draw), ….., (Player2, Draw).



1) Add a lowercase English alphabet at the end of the string.
2) Create a copy of the string and concatenate both of the strings.
Approach: If the length of the string is less than 26 then print -1. The Task is to make a sub-string of length 26 that has all the lowercase characters. Thus, the simplest way is to iterate through all sub-strings of length 26 then for each sub-string count the number of occurrences of each alphabet, ignoring the question marks. After that, if there exists a character that occurs twice or more then this sub-string cannot contain all letters of the alphabet, and we process the next sub-string. Otherwise, we can fill in the question marks with the letters that have not appeared in the sub-string and obtain a sub-string of length 26 which contains all letters of the alphabet.
Two questions from LinkedList and Arrays were there in this round. Difficulty level - Medium



Input : 1 -> 2 -> 3 -> 4 -> 'NULL' and 'K' = 2
Output: 1 -> 2 -> 4 -> 'NULL'
Explanation:
After removing the second node from the end, the linked list become 1 -> 2 -> 4 -> 'NULL'.

https://leetcode.com/problems/remove-nth-node-from-end-of-list/



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
https://www.geeksforgeeks.org/trapping-rain-water/
Two DS questions again in this round. One from Trees and one from tries. Difficulty level - medium



1. A node will be in the bottom-view if it is the bottom-most node at its horizontal distance from the root.
2. The horizontal distance of the root from itself is 0. The horizontal distance of the right child of the root node is 1 and the horizontal distance of the left child of the root node is -1.
3. The horizontal distance of node 'n' from root = horizontal distance of its parent from root + 1, if node 'n' is the right child of its parent.
4. The horizontal distance of node 'n' from root = horizontal distance of its parent from the root - 1, if node 'n' is the left child of its parent.
5. If more than one node is at the same horizontal distance and is the bottom-most node for that horizontal distance, including the one which is more towards the right.
Input: Consider the given Binary Tree:

Output: 4 2 6 3 7
Explanation:
Below is the bottom view of the binary tree.

1 is the root node, so its horizontal distance = 0.
Since 2 lies to the left of 0, its horizontal distance = 0-1= -1
3 lies to the right of 0, its horizontal distance = 0+1 = 1
Similarly, horizontal distance of 4 = Horizontal distance of 2 - 1= -1-1=-2
Horizontal distance of 5 = Horizontal distance of 2 + 1= -1+1 = 0
Horizontal distance of 6 = 1-1 =0
Horizontal distance of 7 = 1+1 = 2
The bottom-most node at a horizontal distance of -2 is 4.
The bottom-most node at a horizontal distance of -1 is 2.
The bottom-most node at a horizontal distance of 0 is 5 and 6. However, 6 is more towards the right, so 6 is included.
The bottom-most node at a horizontal distance of 1 is 3.
The bottom-most node at a horizontal distance of 2 is 7.
Hence, the bottom view would be 4 2 6 3 7



1. If there is no possible path to change BEGIN to END then just return -1.
2. All the words have the same length and contain only lowercase english alphabets.
3. The beginning word i.e. BEGIN will always be different from the end word i.e. END (BEGIN != END).
This round was a mix of Data Structures, System Design and problem solving. The interview started with one DS question and then I was asked a question to design a system which used the logic solved by me in the DS question. I was drilled down with the basics and in depth working of Data Structures and also some of the theories from Software Development (MVC model, etc.) and also I was asked to design the system for the same so I formulated an approach using JAVA, RDBMS, kafka as my main components in the solution.



1. The grid has 0-based indexing.
2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
This round was taken by the Manager and there was a discussion about few of my coding problems I solved in the previous rounds, a little bit of system design, my work in the current company and a few behavioral questions.
Design Netflix.

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?