Tip 1 : Practice at least 250 Questions
Tip 2 : Do at least 2 projects
Tip 1 : Have some projects on resume
Tip 2 : Do not put false things on resume
This round consists of 3 coding questions



Given array/list can contain duplicate elements.
(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.
A simple solution is to traverse each element and check if there’s another number in the array which can be added to it to give sum.
This can be achieved by nested loops.


Input: 'N' = 2, 'NUMS' = [[1, 2], [3, 4]]
Output: [[3, 1], [4, 2]]
Here the given matrix is rotated 90 degrees in a clockwise direction.
(Using temp array): This problem can be solved using the below idea:
After rotating d positions to the left, the first d elements become the last d elements of the array
First store the elements from index d to N-1 into the temp array.
Then store the first d elements of the original array into the temp array.
Copy back the elements of the temp array into the original array



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.
The idea is to use two loops , The outer loop picks all the elements one by one. The inner loop looks for the first greater element for the element picked by the outer loop. If a greater element is found then that element is printed as next, otherwise, -1 is printed.
Follow the steps mentioned below to implement the idea:
Traverse the array from index 0 to end.
For each element start another loop from index i+1 to end.
If a greater element is found in the second loop then print it and break the loop, else print -1.
Where do you see yourself in 5 years?
Why are you leaving your current company?
Why are you the right choice for this role?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?