Ad
  • 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

    Our solutions "pair" up nicely, twins if you will. 🤣🤣

  • Custom User Avatar

    How come there isn't an extremely satisfied button to vote for kata?

  • Custom User Avatar

    Awesome idea!!

  • Custom User Avatar

    Thanks for letting me know. I'll definitely read the docs and do my research before posting the next one. Authoring katas let me approach it differently and exposed me to testing so I'll keep trying.

    I guess the other one I've been working on isn't going to fly either. It's like the counting change katas but all medieval styled and has special denominations.

    Thanks for the advice!

  • Custom User Avatar

    Hi, thanks for letting me know! awesome solutiong btw

  • Custom User Avatar

    aww, dang it. Thought it was a cool one! Thanks for letting me know.

  • Custom User Avatar

    Why not say alphabetical? I get that programatically, lexicographical order is generally alphabetic but the strings in the array are "strings". It would have been a 6 kyu problem if we had to sort the answer by one of the arrays. That would have been more appropriate as a lexicographically sorted solution.