https://leetcode-cn.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/