The Longest Name For A Prince Medium

+100 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES BASH, C, C++, C# AND 21 MORE
    LANGUAGES BASH, C, C++, C#, CLOJURE, ELIXIR, ERLANG, GO, GROOVY, HASKELL, JAVA, JAVASCRIPT, JULIA, KOTLIN, NIM, PERL, PHP, PYTHON2, PYTHON, RUBY, RUST, SCALA, SWIFT, TYPESCRIPT, VB
  • TIME ~25MIN

The Longest Name For A Prince

Challenge outline

Hello and welcome to the challenge!


The king wants to give for his son the longest name (or precisely: sequence of names) possible. Unfortunately, he can use only three names of the sequence accepted by the queen, and they should be a subsequence of that sequence (queens have high demands). Write a code which will help the king solve his problem.


Have fun and good luck! :)