Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

double_o_seven

  • 4 years ago

ps6 #4: http://dpaste.com/hold/560657/ Probably not revolutionary, but what do you think?

  • This Question is Closed
  1. Arbiter
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    At first glance, the code you have written in the functions "get_word_rearrangements" and "pick_best_word_faster" looks fine. There is small typo at the end of the letter where you have "currentHIgh" instead of "currentHigh." Your code in "different_combos" is not quite correct. If you run it on the list ['a', 'b', 'c'] it will miss the subset "ac." It will miss even more subsets as the list gets larger. Also, when you're sorting strings, you're calling the sorted() function with its optional parameters. For example, you have "sorted(w, None, None, False)." You can just call sorted(w) and get the same result. What you're doing isn't wrong, but it's much easier/quicker to type the shorter one.

  2. double_o_seven
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    thanks for catching the typo. I fixed the different combo's to get all the possibilities. I thought i had them before, but i guess I didn't check well enough. thanks. http://dpaste.com/hold/561367/

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy