Leetcode 2781. Length of the Longest Valid Substring | Hello Interview