I am trying to do something in C and I need an algorithm that returns the largest dimension wise sorted array contained in another array. So, for example if I have the following array:
A[5] = {5, 2, 3, 1, 4}
it should return:
2, 3, 4
and I can't think of any efficient implementation. Got any ideas? Thank you. :)