Tuesday common C++ interview problem: Minimize deviation in an array
Given an array of unsigned integers, determine the minimum deviation (max-min) achievable by repeatedly applying the following operations:
- divide an even element by two
- multiply an odd element by two
Solve it yourself: https://compiler-explorer.com/z/n6654cMEj
Solution: https://compiler-explorer.com/z/34hevrsKs