Defuse the Bomb | Leetcode 1652