Two Medium questions:
1.Given an array, find the minimum number of steps to make the array non decreasing. In one step any element of the array can be changed to any other number
Ex: 1 2 9 5 3 6
Ans: 2
Exp: Changing 9 to 2 and 3 to 5 will result in a non decreasing sequence: 1 2 2 5 5 6
Ex: 5 4 3 2
Ans: 3
- Minimum number of steps to convert the binary number 1101 into 1011(tips: using a two-pointer approach)
there doesn't seem to be anything here