Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

I'm on PS6 Problem 4. I'm having trouble understanding exactly what they are asking for and the pseudo code they have provided. In particular the this part: Let d = {} For every word w in the word list: Let d[(string containing the letters of w in sorted order)] = w . What exactly do they mean by sorted order?

MIT 6.00 Intro Computer Science (OCW)
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

@pelikan what class are you taking? I'm taking MIT 6_00SC and I don't see anything about the problem you describe in PS6 Problem 4. In mine, PS6 is all about programming robots.
6.00 Intro to Computer Science. It's about a word game
Let d = {} For every word w in the word list: Let d[(string containing the letters of w in sorted order)] = w They say this part should be a preprocessing step ... so at the start of the program before you do anything else. Lets assume you have a word list containing the following words: python is pretty powerful first you would Let d = {} so it's empty Then for the first word, which is python Let d[(string containing the letters of w in sorted order)] = w or Let d['hnopty'] = 'python' because (string containing the letters of w in sorted order) = 'hnopty' Then repeat for the rest of the words (because it said for every word in the word list) so you end up with d['hnopty'] = 'python' d['is'] = 'is' d['erptty'] = 'pretty' d['elfopuwr'] = 'powerful'

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

thanks. I wasn't sure if they meant sorting the words according to the value of each letter or if they just meant alphabetically. Thanks for the clarification!

Not the answer you are looking for?

Search for more explanations.

Ask your own question