Replace Every Element With the Maximum

Company: Morgan stanley_26aug

Difficulty: easy