Tip 1 : The approach should be clear and should be familiar with the basics of DSA.
Tip 2 : Practice questions on famous algorithms.
Tip 3 : CS Fundamentals are really important for the interview.
Tip 1 : Projects are important and you should be able to explain your project.
Tip 2 : Don't add things if you're not confident in that.
First round was taken by JobTwine, a third party company. So in first round I was asked 2 Leetcode Hard questions. I had to solve it in front of him by sharing my screen.
And he also asked about basics of OS and DBMS.



An array ‘B’ is a subarray of an array ‘A’ if ‘B’ that can be obtained by deletion of, several elements(possibly none) from the start of ‘A’ and several elements(possibly none) from the end of ‘A’.



Input: 'list' = [1, 2, 3, 4], 'k' = 2
Output: 2 1 4 3
Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.
All the node values will be distinct.
For the second round I was asked a DSA hard question and asked to solve sharing my screen. He asked OS DBMS AND OOPS.


A [ i + 1 ] - A [ i ] > 0 if and only if S [ i ] = ‘P’
A [ i + 1 ] - A [ i ] < 0 if and only if S [ i ] = ‘N’
for all 'i' belonging to [0, N-1] inclusive
If there are multiple answers possible, return any one of them.
If you are running a custom test case, then 1 will be printed if the returned array is correct, else 0 will be printed.
If you wish to check your output then use print statements before returning the final answer.
If N = 5 and the array is: { 1, 6, 4, 3, 5 }
We will return { 6, -1, 5, 5, 6 }
because 6 is the first element to the right of 1 that is greater than 1,
no element exists that is greater than 6,
5 is the first element to the right of 4 that is greater than 4,
5 is the first element to the right of 3 that is greater than 3,
6 is the first element to the circular-right of 5 that is greater than 5.
In the final round, 1 DSA question, OS, SQL query medium, DBMS, OS and API.



If two numbers have the same frequency then keep the one that was present before the other in the original given list (array) first.
Input: arr[] = {2, 5, 2, 8, 5, 6, 8, 8}
Output: arr[] = {8, 8, 8, 2, 2, 5, 5, 6}
Explanation :
When you sort the array based on the decreasing order of the frequency of repetition of integers in the original array,
you’ll find that the element ‘8’ is the integer with the most repeated values therefore it would be arranged first after which since both 2 and 5 have the same number of repeated
values in the original array but since the 2 arrived first so we will first arrange 2 and then 5 in our resultant array, while would be the last element after sorting here.
I first did it by dictionary, and then sorted the dictionary using in-built function.
But then he asked me to do it another way without using in-built functions.
Then I gave the approach of priority queue and did the questions using in-built priority queue.
But then he asked me to design priority queue and then I designed it.

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