Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try to simulate the process.
For every iteration, find the new array using the old one and the given rules.
Solve with full IDE support and test cases