摘要: You have an array arr of length n where arr[i] = (2 * i) + 1 for all valid values of i (i.e. 0 <= i < n). In one operation, you can select two indices 阅读全文
posted @ 2020-08-16 14:11 Schwifty 阅读(226) 评论(0) 推荐(0)
摘要: Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Example 1: Input: arr = [2,6 阅读全文
posted @ 2020-08-16 13:42 Schwifty 阅读(213) 评论(0) 推荐(0)
摘要: Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm th 阅读全文
posted @ 2020-08-16 13:21 Schwifty 阅读(108) 评论(0) 推荐(0)