摘要: 题目链接:https://leetcode-cn.com/problems/peaks-and-valleys-lcci 题目描述: 在一个整数数组中,“峰”是大于或等于相邻整数的元素,相应地,“谷”是小于或等于相邻整数的元素。例如,在数组{5, 8, 4, 2, 3, 4, 6}中,{8, 6}是 阅读全文
posted @ 2021-08-15 15:42 张宵 阅读(155) 评论(0) 推荐(0)
摘要: 题目链接:https://leetcode-cn.com/problems/increasing-triplet-subsequence 题目描述: 给你一个整数数组 nums ,判断这个数组中是否存在长度为 3 的递增子序列。 如果存在这样的三元组下标 (i, j, k) 且满足 i < j < 阅读全文
posted @ 2021-08-15 15:37 张宵 阅读(113) 评论(0) 推荐(0)