Tip 1 : In the DSA topic you should focus more on problems. You should try a different approach to solve the same problem. Because in any interview interviewer asks the same.
Tip 2 : Theoretical subjects like OS, DBMS, and can you can do from the internet.
Tip 1 : Don't write the things which you don't know.
Tip 2 : Mention some good project.



For the given arr[ ] = { -1, 3, 5, 0, -2, -5 }
arr[ ] = {3, -1, 5, -2, 0, -5 } is valid rearrangement.
arr[ ] = {3, -1, 0, -2, 5, -5 } is invalid rearrangement; order of 0 and 5 is changed.
arr[ ] = {3, -1, 5, 0, -2, -5 } is invalid rearrangement; positive and negative elements are not alternative.
Make changes in the same array and no returning or printing is needed.
Consider zero(0) as a positive element for this question.
It is guaranteed that an answer always exists.



I have solved this q using the arithmetic operator.
a=20;
b=30;
a=a+b;
b=a-b;
a=a-b;
It was at 2 pm.



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

I used the slow and fast pointer approach.
It was like a managerial round. They gave me a puzzle to solve.
You have given 7 apples. Out of the, 1 defect. You are given a weighing machine. You have to tell the minimum iteration in which you can find the defective one.
Tip 1:Divide and conqure techniqe
Tip 2:3+3+1
put 3-3 apples on the machine if it gives the same reading it means the remaining 1 defects one. Else the machine which is giving a minimum reading is containing defected one.
Tip 3: Now do the same for 3 apples which are given minimum reading.
1+1+1
put 1-1 apple on the machine if it gives the same reading it means the remaining 1 defects one. Else the machine which is giving a minimum reading is containing defected one.
So in 2 iterations, we can find the defective one.

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