Ad
  • Custom User Avatar

    you messed up something in your logs or you're mutating the input (I'll bet on this one): the related tests are correct:

    words=['javascript', 'java', 'ruby', 'php', 'python', 'coffeescript', 'c', 'cpp', 'brainfuck'].shuffle
    test_dict=Dictionary.new(words)
    Test.assert_equals(test_dict.find_most_similar('heaven'),'java')
    Test.assert_equals(test_dict.find_most_similar('javascript'),'javascript')