Tip 1: Prepare for DSA
Tip 2: Prepare Python
Tip 1: Have some projects in Python.
Tip 2: Have certificates in Python.
The interview started on time. I joined 5 minutes early, and the interviewer joined on time.



‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’.
‘ARR1’ = [3 4 6 9 10]
The idea is based on the approach of combining two arrays and sorting them.
Algorithm:

The array is 1-indexed.
You are given, ‘arr’ = [4, 3, 0, 2], here the sub-array [4, 3, 0] is the sub-array where the difference between the minimum and the maximum elements in the sub-array is 4 - 0 = 4, which is greater than the length. Hence the answer is [1, 3]. Thus, the answer is ‘YES’.
Use two pointers, start and end, to maintain the starting and ending points of the array, and follow the steps below:



Merge Sort Algorithm -
Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

The above illustrates shows how merge sort works.
It is compulsory to use the ‘Merge Sort’ algorithm.
Tip 1: Knowledge of arrays
Tip 2: Knowledge of lists
Tip 3: Knowledge of the two-pointer approach

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