How to solve the problems like increase array element by some number or decrease array element by some number so that array becomes equal .
i mean which number we should increase or decrease how to decide that
may be there some common pattern between all problems of these types
Ex Problem : CodeChef: Practical coding for everyone
Well in the example problem you can increase or decrease any element any number of times so the answer will be YES always.
But otherwise, it can depend on questions for example minimizing the no. of changes applied.
then you can convert every element equal to the most occurred element.
what if no of elements are of occured same times