Homework Questions? Ask a Tutor for Answers ASAP
Unscramble permuted words by generating all permutations of Jumble string and searching for word in Unix dictionary. It is due no later than Friday. It requires the programming language of Ruby on Rails, the output must be viewed in the command prompt, and the files should be saved as a rb file. There is a txt file for section three. http://wikisend.com/download/842018/dict.txt. There is three parts to this HW.
1. Write a user defined function named to_array that converts a String object to an array like this:
2. Write a method called get_permulations that inputs an array of single characters (like ["d", "o", "g"]). The method should return an array of all permutations of the Jumble string. The permutations in the array should be in string format.
3. Compare the words in the Unix dictionary to the permutation strings in the array. Print any matches that are found. Here is some that might help:
endClose file object fin.
HI, I will have a look at this. I got the hw doc and dict.txt, anything else I'll need?
What version of Ruby?
Is it possible to include test strings included in a comment and source code comments for what each particular section does? They don't have to be detailed just a brief sentence or comment.