Longest Increasing and Decreasing Subsequences | Synapse