Leetcode 2588. Count the Number of Beautiful Subarrays | Hello Interview