Leetcode 3112. Minimum Time to Visit Disappearing Nodes | Hello Interview