Minimum Operations to Empty Array

Company: Flipkart_18thjuly

Difficulty: medium