yeah hours - stanford universitystanford.edu/.../assignments/hw2-adts-yeah.pdfyeah hours alexander...
TRANSCRIPT
![Page 1: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/1.jpg)
YEAH HoursAlexander De Baets
![Page 2: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/2.jpg)
Helpful Resources
● Lecture 4 ADTs: Stack, Queue● CS106B+X Style Guide● Stanford C++ Documentation
![Page 3: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/3.jpg)
Other helpful resources!
● The CLaIR! ○ 8PM-10PM Sunday through Thursday at Old Union○ This is for conceptual questions.
● The LaIR!○ 6PM-Midnight Sunday through Thursday at Old Union.○ This is more geared for students who have started and has bugs!
![Page 4: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/4.jpg)
PROJECT 1: WORD LADDER
![Page 5: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/5.jpg)
Word Ladder!
![Page 6: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/6.jpg)
Word Ladder
● First, enter a dictionary (such as dictionary.txt)● Then, enter in a word. This word MUST be in the dictionary!● Next, enter in another word. This word must be in the dictionary
AND be of the same length of the first word AND not the same as the first word
● Find the word ladder!
![Page 7: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/7.jpg)
Actually finding the word ladder - BFS
![Page 8: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/8.jpg)
The Pseudo Code
![Page 9: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/9.jpg)
A couple quick notes
● You can ignore case!● Pass your lexicon by reference!● Make a copy of your stack!● Again, make sure you check all the user inputs!
![Page 10: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/10.jpg)
PROJECT 2: TWO FLAVORS OF RANDOM
SENTENCE GENERATOR
![Page 11: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/11.jpg)
![Page 12: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/12.jpg)
Random Sentence Generators
● First, prompt the user for the file (such as Hamlet.txt)● Prompt the user for the N value (more on this in a second!)● Prompt the user for the number of random words to generate!
![Page 13: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/13.jpg)
Step 1: Create the Map!
![Page 14: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/14.jpg)
Step 2: Generate Text!
![Page 15: YEAH Hours - Stanford Universitystanford.edu/.../assignments/hw2-adts-yeah.pdfYEAH Hours Alexander De Baets. Helpful Resources Lecture 4 ADTs: Stack, Queue CS106B+X Style Guide Stanford](https://reader033.vdocuments.us/reader033/viewer/2022051608/604090beb2bd3a6cdb4d615c/html5/thumbnails/15.jpg)
Good Luck!