11641: 【原1641】Increasing Triplet Subsequence
题目
题目描述
author: Online Judge 原OJ链接:https://acm.sjtu.edu.cn/OnlineJudge-old/problem/1641
Description
Given an unsorted array, return whether an increasing subsequence of length 3 exists or not in the array. More specifically, if there exists i, j, k such that arr[i] < arr[j] < arr[k] given 0 <= i < j < k <= n-1, return true; else return false.
Sample Input 1
5
1 2 3 4 5
Sample Output 1
true
Sample Input 2
5
5 4 3 2 1
Sample Output 2
false
The first line of sample input is the length of the array.
Oops! 本题目还没有解答!
助教老师们编题的速度,已经超过了解题的速度!
OJ翻了一新,但本解答集还大多用的是2017-2019级,甚至更早的同学们贡献的答案。
如果你已经AC了,可以的话,请您参考添加页面,与大家一起分享你的题解!