Leetcode 2518. Number of Great Partitions | Hello Interview