Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

David_Novo

  • 3 years ago

What's your opinion on this solution to number 2 from problem set 4 (Spring 2011)? http://dpaste.com/788291/

  • This Question is Closed
  1. WilliamXing
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Hi David, unlikely though, what if you get 2 shifts that returns exactly the same count? The list.max() will only return the first max number.

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

    Yes, but if there are two shifts that return the same count, it's indifferent which one it returns right?

  3. WilliamXing
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    maybe for a long text they decrypt different words but happen to be the same number? We may need a way to iterate the list and return all indices with the max number and also check the decoded texts?

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

    This is Problem Set 4 - Question 2. Your answer is probably related to question 4. This function is used to decode a message that was encoded using just one shift. Multiple shifts are considered in question 4. In this case the shift that decodes more words will decode all the words in the message because it was encoded with one shift only.

  5. 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