Tip 1 : Practice Atleast 300 Problems from LeetCode and GeeksforGeeks(GFG).
Tip 2 : Don't ignore subjects like Operating Systems, Computer Networks, and Database Management Systems.
Tip 3 : Be well prepared with your projects.
Tip 1 : Mention all the projects in your resume.
Tip 2 : Make Sure that your resume is simple and also try to fit all the information in only one page.
Round 1- The online round had 4 sections:
1) Code Debugging Section: 7 questions to be debugged in 20 minutes (C/C++/Java)
2) Coding questions: There were 2 coding questions
3) Workstyle and Behavioural assessment: 20 minutes
4) Reasoning Ability: 35 minutes (easy-medium)(Aptitude and Logical Reasoning Questions)


If STR1 = “codingninjas” and STR2 = “sing”. We can form the second string using the characters of the first string. This is because “s”, “i”, “n”, “g” are present in the string STR1.
1) I solved this problem in O(n) time and O(n) space.
2) The idea is based on the fact that inorder traversal and preorder traversal of the tree.
3) Tree X is a subtree of Y if both inorder and preorder traversals of X are substrings of inorder and preorder traversals of Y respectively.


If the given matrix is:
[ [1, 2, 5],
[3, 4, 9],
[6, 7, 10]]
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
1) I solved this problem in O(n+m) time and O(1) space.
2) I solved it using divide and conquer approach.
3) I was lucky because i had already solved this problem before in leetcode.
It was a technical round. The interviewer mainly focused on Data Structures and Algorithms and asked me a few questions on operating systems.



1. The size of ‘ARR’ will always be greater than or equal to the ‘K’.
2. Here window refers to a subarray of ‘ARR’. Hence ‘K’ sized window means a subarray of size ‘K’.
3. You are not required to print the output explicitly. It has already been taken care of. Just implement the function and return an array of the count of all distinct elements in the ‘K’ size window.
Consider ARR = [ 1, 2, 1, 3, 4, 2, 3 ] and K = 3.

As per the given input, we have a sequence of numbers of length 7, and we need to find the number of distinct elements present in all the windows of size 3.
Window-1 has three elements { 1, 2, 1 } and only two elements { 1, 2 } are distinct because 1 is repeating two times.
Window-2 has three elements { 2, 1, 3 } and all three elements are distinct { 2, 1, 3 }.
Window-3 has three elements { 1, 3, 4 } and all three elements are distinct { 1, 3, 4 }.
Window-4 has three elements { 3, 4, 2 } and all three elements are distinct { 3, 4, 2 }.
Window-5 has three elements { 4, 2, 3 } and all three elements are distinct { 4, 2, 3 }.
Hence, the count of distinct elements in all K sized windows is { 2, 3, 3, 3, 3 }.
1) First I did in a brute force approach O(n^2).
2) Interviewer asked me to optimize my approach.
2) Finally I optimized it to O(n) by using a HashMap.



The given linked lists may or may not be null.
If the first list is: 1 -> 4 -> 5 -> NULL and the second list is: 2 -> 3 -> 5 -> NULL
The final list would be: 1 -> 2 -> 3 -> 4 -> 5 -> 5 -> NULL
1) First solved it iteratively using a while loop.
2) Then the interviewer asked me to solve it using recursion.
3) I then modified my approach.
4) We discussed all the edge cases and finally the interviewer got satisfied.
Two questions of operating systems were asked: -
1. What is thrashing?
2. Explain the Round Robin Scheduling algorithm?
Tip 1 : Prepare Operating System Questions from Geeks for Geeks.
Tip 2 : If you have sufficient time then go through Galvin textbook.

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?