016 countSawSubarrays

given an array of integers, find the number of contiguous subarrays that represents a sawtooth sequence of at least two elements.

it reminds me of the problem of the swing array.

posted @ 2020-12-22 01:42  EvanMeetTheWorld  阅读(28)  评论(0)    收藏  举报