4 kyu

Recover a secret string from random triplets

8,775 of 17,718zpconn

Description:

There is a secret string which is unknown to you. Given a collection of random triplets from the string, recover the original string.

A triplet here is defined as a sequence of three letters such that each letter occurs somewhere before the next in the given string. "whi" is a triplet for the string "whatisup".

As a simplification, you may assume that no letter occurs more than once in the secret string.

You can assume nothing about the triplets given to you other than that they are valid triplets and that they contain sufficient information to deduce the original string. In particular, this means that the secret string will never contain letters that do not occur in one of the triplets given to you.

Algorithms

Stats:

CreatedAug 20, 2014
PublishedAug 25, 2014
Warriors Trained70912
Total Skips21274
Total Code Submissions149430
Total Times Completed17718
Python Completions8775
Java Completions2005
JavaScript Completions5388
Ruby Completions675
Haskell Completions322
Clojure Completions106
Rust Completions527
Crystal Completions15
Swift Completions128
Total Stars2639
% of votes with a positive feedback rating94% of 2175
Total "Very Satisfied" Votes1944
Total "Somewhat Satisfied" Votes195
Total "Not Satisfied" Votes36
Ad
Contributors
  • zpconn Avatar
  • jhoffner Avatar
  • xcthulhu Avatar
  • laoris Avatar
  • Abbe Avatar
  • kombucha Avatar
  • tko Avatar
  • outergod Avatar
  • Firefly2002 Avatar
  • Keozon Avatar
  • Voile Avatar
  • hobovsky Avatar
  • user8436785 Avatar
  • Wouter125 Avatar
  • saudiGuy Avatar
Ad