Leetcode 3029. Minimum Time to Revert Word to Initial State I | Hello Interview