Minimum Cost to Reduce N to 1

Company: INFOSYS

Difficulty: medium