Calculate the longest increasing/decreasing subsequence via RSK
Test for RSK