Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4kyu Secret Phrase Problem #39

Open
simon-tiger opened this issue May 21, 2020 · 0 comments
Open

4kyu Secret Phrase Problem #39

simon-tiger opened this issue May 21, 2020 · 0 comments

Comments

@simon-tiger
Copy link

⚠NOTE⚠: This kata is reworded, because I used this wording in my not-published-yet video on the problem.

You need to guess a secret phrase. You know the following about it:

  1. A sequence of triplets [a, b, c], such that, for every triplet, a comes before b comes before c in the phrase.
  2. The letters that appear in the triplets are the only letters in the phrase.
  3. Each letter in the phrase appears once and only once in the phrase.

Input: The sequence of triplets
Output: The secret phrase
Example:

Input                 Output
[["t", "u", "p"],     "whatisup"
 ["w", "h", "i"],
 ["t", "s", "u"],
 ["a", "t", "s"],
 ["h", "a", "p"],
 ["t", "i", "s"],
 ["w", "h", "s"]]

Link: https://www.codewars.com/kata/53f40dff5f9d31b813000774

@simon-tiger simon-tiger changed the title 4kyu String Recovery Problem 4kyu Secret Phrase Problem May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant