Minimum Operations to Empty an Array of Powers of Two

Company: Visa

Difficulty: medium