Ad
  • Custom User Avatar

    genius. Really cool, there is no replace chain like mine)

  • Custom User Avatar

    I thought for every hit to the ship 0.5 points. But I did not pass the test - I racked my head, read the comments and only saw there that 0.5 times the number of damaged ships was needed to calculate...

    Either I'm stupid, or the translator let me down, but in the end, thanks to the commentators)

  • Custom User Avatar

    spread is in O(n) time which is eclipsed by the 2 for loops running anyway. I probably could have called "includes" on the original set of WORDS in the last if statement but I didn't spend the time improving the efficiency or looking for a better way to confirm the word is available in that set. I was happy I figured this one out and called it a day. This works pretty fast anyway because it searches through words in WORDS that are sorted by the same letters in the word being checked after being filtered by length of the word being checked.

  • Custom User Avatar

    I'm not sure, but it seems ...spread is an expensive operation, especially for such large dictionaries

  • Custom User Avatar