Find Minimum Time to Reach Last Room 1 & 2 | Leetcode 3341 and 3342