Maximize length of increasing subsequence possible by appending given sequence
Given a sequence A1,A2,A3,….,An and an empty sequence B. You need to find M minimum number of times this sequence should be appended in B, so that the length of longest increasing sequence in B is maximum possible. Examples: Input : [2,1] Output : 2 Explaination: If we append the sequence 2 times then the resulting sequence is… Read More »
