Uber OA
Anonymous User
326

have an array , we have to make it a incresing stair step or decresing stair step by adding to it find the minimum number to be added to all, each element should differ by only 1
tower = [1,4,3,2] ans = 4 as we can add 4 to first element, then tower = [5,4,3,2]
tower = [5,7,9,4,11] ans = 9 as tower = [7,8,9,10,11]

Comments (0)