Minimum Cost to Remove All Stones

Company: Google

Difficulty: hard