Added longest in/decreasing subsequence and a basic tree