LeetCode – Increasing Triplet Subsequence (Java)
Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Examples: Given [1, 2, 3, 4, 5], return true. Given [5, 4, 3, 2, 1], return false. Analysis This problem can be formalized as finding a sequence x, y and z, such that x < y < ... Read more