Can someone help me with solution to this problem:
Given an array, return true if all elements of the array can be made equal by performing atmost 1 operation on each element.
In one operation a value can be increased by 1 or decreased by 1
Array values are between 0 to 9 and 9 increased by 1 becomes 0
example: [0, 1, 1, 9, 9, 9, 0]
ans: true