This level is about unscrambling words. Find the original (unscrambled) words, which were randomly taken from a wordlist.<-- Send a comma separated list of the original words, in the same order as in the list below. You have 30 seconds time to send the solution.
List of scrambled words: anbdnor foloabtl lddaie aenvass cgaillo oternh lonecle cawtrfar gsneeis kaytde
As you can understand, we are primarily given a (pretty long) wordlist or dictionary if you like, as well as a list of scrambled words.
Our objective is obvious. We must find which original, 'unscrambled' word from the given wordlist matches which 'scrambled' word from the list, in the given time (of 30 seconds).
We are - lastly - asked to submit our output in comma-separated format -
(Example: word1,word2,word3, ... word9,word10).
I bet you've already thought of a way to approach this easy task. No? Don't worry, I'll give you a hand.
You can use most languages to solve this challenge (e.g. ruby, java & python). Personally, I chose to use my, by far, favorite language - Python.
What I want Python to do for me is, firstly, read through the two lists and sort all strings alphabetically. Subsequently, I want it to iterate through each one of the scrambled words, and look for a match in the wordlist. Once a match is established, it will append the unscrambled form of the word to a list, and once all strings are matched, it displays the final list in comma-separated format (as requested by HTS).
Trust me. It's waay easier than it sounds.
Here is my final piece of code:
How To Use
I have purposely made this python script short and simple. Additionally, I've made it incredibly easy to use:
- Download the ZIP file from Github Gist.
- Paste your list of scrambled words into the
scrambled.txtfile. (Overwrite the original file, and replace its contents with your scrambled words.)
- Run the python file using either your compiler (e.g. IDLE or Atom), or by simply executing it through terminal:
$ python scrambled.py. (If you're using terminal, make sure you are in the right directory.)
- Submit the comma-separated output to the HackThisSite website by copying and pasting it to the
Answer:form of Level 1.
Woo-hoo! Piece of cake, wasn't it?
Stay put. More coming!
⚡ k4m4 from 127.0.0.1