Tip 1 : Focus on DSA
Tip 2 : Practice as much questions as you can
Tip 3 : Do at least 2 projects
Tip 1 : Make it one pager
Tip 2 : Put things related to job profile only



Input: 'N' = 3, ‘ARR’ = [1, 2, 3]
Output: 3
It is possible to make all elements of the given array equal by three moves only. There is no possible solution that can perform the task in minimum moves than 3.
[1, 2, 3] => [2, 3, 3] => [3, 4, 3] => [4, 4, 4]



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.
It was a standard question, I did it by two pointers
2 Coding Questions were asked



Let's say the given array is [ 9, 98, 7].
All the possible numbers formed by concatenating each of the array elements are 7989,7998,9879,9897,9987,9798. Among the six numbers, 9987 is the greatest number. Hence the answer is 9987.
I try to did it by sorting but was stuck in getting the final solution


m = 4, n = 3, mat = {{1, 1, 1}, {2, 1, 2}, {1, 2, 1}, {1, 1, 1}}, val = 5.
In this example, the maximum value of length of side which can be obtained is 2, Having the starting index: {0, 0} or {0, 1} or {2, 0} or {2, 1}.
I try to solve it by using dp.

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?