Tip 1 : Practice different types of questions
Tip 2 : Try to practice in a time period.
Tip 3 : Timely revise the concepts
Tip 1 : Be honest with your resume
Tip 2 : Be smart with your resume
It was an evening round.



1. Store the first k elements in an array and sort that in ascending order.
2. Store the remaining n-k elements in an array and sort that in descending order.
3. Merge the two arrays by adding the elements from the second array in reverse order.



Let S = “abdd” and X = “bd”.
The windows in S which contain all the characters in X are: 'abdd', 'abd', 'bdd', 'bd'.
Out of these, the smallest substring in S which contains all the characters present in X is 'bd'.
All the other substring have a length larger than 'bd'.
It was an afternoon rounds. The interviewers were friendly.



Input:
‘ARR’ = [-6,-3, 2, 1, 5]
If we take a square of each element then the array/list will become [36, 9, 4, 1, 25].
Then the sorted array/list will be [1, 4, 9, 25, 36].
Output :
[1, 4, 9, 25, 36].



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.

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?