Tip 1: DSA
Tip 2: CS fundamentals (mainly OOP and DBMS)
Tip 1: Don’t include false information in your resume.
Tip 2: Be well-prepared with your resume.
2 coding questions and 15 MCQs.



Given array/list can contain duplicate elements.
(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.



In the given linked list, there is a cycle starting at position 0, hence we return 0.

It's a classic algorithm for detecting cycles in a linked list. We use two pointers to traverse the list: the first moves one node at a time, and the second moves two nodes at a time. If there is a cycle, the pointers will eventually meet, and we return true. If the fast pointer reaches the end of the list, it means there is no cycle, and we return false.
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
(A) In deadlock prevention, the request for resources is always granted if the resulting state is safe
(B) In deadlock avoidance, the request for resources is always granted if the result state is safe
(C) Deadlock avoidance is less restrictive than deadlock prevention
(D) Deadlock avoidance requires knowledge of resource requirements a priori
Look at this series: 7, 10, 8, 11, 9, 12, ... What number should come next?
The cost price of 20 articles is the same as the selling price of x articles. If the profit is 25%, then the value of x is:
2 Coding Questions



Do not allocate extra space for another array. You need to do this by modifying the given input array in place with O(1) extra memory.
'n' = 5, 'arr' = [1 2 2 2 3].
The new array will be [1 2 3].
So our answer is 3.
Intuition:
The intuition is to use two pointers, i and j, to iterate through the array. The variable j keeps track of the current index where a unique element should be placed. The initial value of j is set to 1 because the first element in the array is always unique and does not need to be changed.



a) Duplicate elements may be present.
b) If no such element is present return -1.
Input: Given a sequence of five numbers 2, 4, 5, 6, 8.
Output: 6
Explanation:
In the given sequence of numbers, number 8 is the largest element, followed by number 6 which is the second-largest element. Hence we return number 6 which is the second-largest element in the sequence.
The idea is to sort the array in descending order and then return the second element that is not equal to the largest element in the sorted array.

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?