2518. Number of Great Partitions | Dynamic Programming | Leetcode Weekly Contest 325| LeetCode