Tip 1 : Don't by heart the question ,understand the concept
Tip 2 : Do at least one question in a day
Tip 1 : Mention the skill in your resume for which you are applying the role.
Tip 2 : Resume should be 1 page,.
it is consist of MCQ and 3 coding question



If the given array is [1,2,3] then the answer would be 2. One of the ways to make all the elements of the given array equal is by adding 1 to the array element with value 1 and subtracting 1 from the array element with value 3. So that final array would become [2,2,2].
The idea is to use BFS for this. We run a BFS and create nodes by multiplying with 2 and subtracting by 1, thus we can obtain all possible numbers reachable from starting number.
Important Points :
When we subtract 1 from a number and if it becomes < 0 i.e. Negative then there is no reason to create next node from it (As per input constraints, numbers x and y are positive).
Also, if we have already created a number then there is no reason to create it again. i.e. we maintain a visited array.
Coding Question


Input: [1,2,3,4,5]
Output: [5,4,3,2,1]

The idea of the solution is to hold all values in Function Call Stack until the stack becomes empty. When the stack becomes empty, insert all held items one by one at the bottom of the stack.

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?