https://medium.com/@9.ninad.6/leetcode-daily-day-3-longest-strictly-increasing-or-strictly-decreasing-subarray-b5c2a0d64aeb