Help me, I'm stuck

Revision en1, by Destopia, 2021-05-20 13:29:05

Given N strings N <= 1000. I'm allowed to choose a subsequence such that the concatenation of the chosen elements gives the maximum lexicographical string. For example N = 3, ["ab", "ac", "b"] answer = "b", N = 2 ["z", "za"] answer is "zza". How to solve this problem?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Destopia 2021-05-20 13:30:45 18 Tiny change: ' <= 1000. I'm allowed to choose' -> ' <= 1000. The task is to choose'
en1 English Destopia 2021-05-20 13:29:05 295 Initial revision (published)