Distinct elements subsequence

Revision en1, by jhjfbsbfkbjfnfnfjfj, 2020-04-27 00:03:42

Hello everyone, can you please help me in this problem? If I am given an array of n integers of k distinct elements. Then how do I compute the maximum subsequence which has exactly f distinct elements (f< k). (like of all the subsequence which has f distinct elements among them the maximum length ) Example question: (in this problem f==k-1) https://www.codechef.com/problems/NOTALLFL

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English jhjfbsbfkbjfnfnfjfj 2020-04-27 00:03:42 418 Initial revision (published)