Tip 1 : Practice competitive programming
Tip 2 : Make your data structure strong
Tip 3 : Make sure your OOPS concepts is clear.
Tip 1 : Make a strong resume only add those skill in which you are perfect.
Tip 2 : Add projects in which you have good knowledge



Given an array/list ‘ARR' = [ 3, 2, 4, 5, 6 ] and 'K' = 3. The 3rd smallest element is "4" because the order of numbers is [ 2, 3, 4, 5, 6 ].
First sort the array
second print the value at 2nd position



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
while (current != NULL) {
// Store next
next = current->next;
// Reverse current node's pointer
current->next = prev;
// Move pointers one position ahead.
prev = current;
current = next;
}
There were three coding questions
1. Easy
2. Medium
3. Hard



1. Read all the inputs.
->number of rows and columns say m and n.
->mxn matrix elements.
->base column number b.
2. let i is the row index and j is the column index which starts from 0.
->hence first element of the base column b means (0,b).
3. start applying the sort logic on the column b=2.
4. for every swap required swap the elements in the other columns as well.
->when it's checked that (r1, b)needs to be swapped with (r2, b), don‟t just swap these
two
->start from column 1, swap element at r1 with that of r2, then go on until the column n.
->repeat the swapping until all the m elements of the base column b are sorted.



Let ‘ARR’ be: [1, 4, -5]
The subarray [1, 4, -5] has a sum equal to 0. So the count is 1.
1. Maintain sum of elements encountered so far in a variable (say sum).
2. If current sum is 0, we found a subarray starting from index 0 and ending at
index current index
3. Check if current sum exists in the hash table or not.
4. If current sum already exists in the hash table then it indicates that this sum was
the sum of some sub-array elements arr[0]…arr[i] and now the same sum is
obtained for the current sub-array arr[0]…arr[j] which means that the sum of the
sub-array arr[i+1]…arr[j] must be 0.
5. Insert current sum into the hash table
Interviewer asked all the question which I attempted during your coding round.
You need to tell about the time complexity, then he will ask you to reduce the complexity
And some question related to OOPS, DP etc



‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’.
‘ARR1’ = [3 4 6 9 10]
1. Create an array arr3[ ] of size n1 + n2.
2. Simultaneously traverse arr1[ ] and arr2[ ].
o Pick smaller of current elements in arr1[ ] and arr2[ ], copy this
smaller element to next position in arr3[ ] and move ahead in
arr3[ ] and the array whose element is picked.
3. If there are remaining elements in arr1[ ] or arr2[ ], copy them also in
arr3[ ].

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the output of print (0.1 + 0.2 == 0.3) in Python?