Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Increasing Triplet Subsequence
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Given an array, determine if there exists a increasing subsequence of length 3.
Sample Input:
[1,2,3,4,5]
Sample Output:
true
Hints
Hint 1
Track two smallest values seen so far
Hint 2
If current number > second smallest, triplet exists
Hint 3
Update smallest and second smallest as needed
Code Editor
Reset
Run
Save
Loading...