Algorithm · Meta · Medium
Given a Binary Search Tree, determine the length of its longest strictly increasing subsequence while preserving the nodes' original order. The input is a space-separated sequence of node values in insertion order; the first value is the root, and each subsequent value is inserted according to the Binary Search Tree property. Here, “original order” means this insertion order. The tree node is represented as follows: Return the size of the longest increasing subsequence.…
Checking your access…