Leetcode 2767. Partition String Into Minimum Beautiful Substrings | Hello Interview