I want to find the maximal subset of an array which is sorted in ascending order
Say I have
a = [2, 1, 4, 6, 7]
a_max_subset = [1, 4, 6, 7]
b = [4, 1, 2]
b_max_subset = [1, 2]
c = [2, 5, 13, 8, 6, 23, 33]
c_max_subset = [2, 5, 8, 23, 33]
Is there an efficient way to do this ?