Increasing subsequence: {5, 7, 10, 15, 17}
Increasing subsequence: {5, 7, 10, 15, 21}
Decreasing subsequence: {23, 21, 17}
Decreasing subsequence: {22, 21, 17}
Decreasing subsequence: {23, 10, 3}
Decreasing subsequence: {23, 15, 3}
Decreasing subsequence: {22, 10, 3}
Decreasing subsequence: {23, 15, 3}
there are many decreasing sub sequence possible..
max Increasing subsequence=5
max Decreasing subsequence=3
Comments
Leave a comment