Tip 1 : Try to solve at least 200 questions of different patterns.
Tip 2 : Make at least 1-2 good projects.
Tip 3 : Put some focus on DBMS, OS, CN as well.
Tip 1 : At least have 2 projects on your resume. It should not be copy pasted.
Tip 2 : Do not put false things.
It consists of 2 tests. The first test was the MCQ round which took place for 30 minutes. The 2nd test was coding round which took place for 6 minutes.



You are given ‘ARR’ = [5, 2, 3]
In the first step, you can change 5 to 3, so the new array is [3, 2,3].
In the second step, you can change the 3 to 2, then the array is [2, 2,3].
In the third step, you can change the 3 to 2, then the array is [2, 2, 2]
Hence the answer is 3.
Step 1: Take the target array first.
Step 2:Take the result as 0.
If all are even, divide all elements by 2
and increment result by 1.
Step 3:Find all odd elements, and make them even by
reducing them by 1. and for every reduction,
increment result by 1.
Step 4:Finally, we get all zeros in the target array.
The timing was at 9 AM. The interviewer was helpful. He started by introducing himself and later asked about me. He asked 2 DSA questions and asked me to implement a piece of my JavaScript project. I was able to do both things.



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Intially i told him brute force approach with O(N^3) .
He asked me to optimize it so i told him using pointer approach.



In the given linked list, there is a cycle, hence we return true.

Use slow and fast pointer approach.
The timing was at 2 PM the same day. The interviewer was helpful. She started by introducing herself and later asked about me. She asked 2 DSA questions, some SQL queries, and project-related questions.



The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.
The number of edges between two nodes represents the length of the path between them.
Input: Consider the given binary tree:

Output: 6
Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.
1. Traverse the tree recursively.
2. At every node, calculate height of left and right subtrees.
3. Calculate the diameter for every node .
4. Calculate the maximum of all diameters.



The given linked list is 1 -> 2 -> 3 -> 2-> 1-> NULL.
It is a palindrome linked list because the given linked list has the same order of elements when traversed forwards and backward.
Can you solve the problem in O(N) time complexity and O(1) space complexity iteratively?
The first approach was to store all list numbers in ArrayList and then perform some operations.
The second approach was to use slow and fast pointers to find the middle element and then check.
It was an HR round and this was for around 20 minutes and asked me to introduce myself and several other questions.
1. Introduce yourself.
2. What are your hobbies?

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?