Ascending Order Subsequences - Coding problem | OneNoughtOne