data structure min chen school of computer science and engineering seoul national university
TRANSCRIPT
![Page 1: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/1.jpg)
COURSE PROJECTS
Data Structure
Min Chen
School of Computer Science and Engineering
Seoul National University
![Page 2: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/2.jpg)
Project 1: Peg Solitaries
Requirements:Design a Peg Solitaries Game
![Page 3: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/3.jpg)
Project 1: Specification
GUIEither command line or graphic interfaceBetter GUI will get incentive
* * *
* * *
* * * * * * *
* * * O * * *
* * * * * * *
* * *
* * *
Move (a,b) to (c,d)
![Page 4: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/4.jpg)
Project 1: Specification
System DesignChessboard Class
○ Display the chessboard and chessman○ Display the deletion of each move
Judgment System○ If one move is valid○ If game ended
Solution Algorithm○ Calculate the solution for the game
![Page 5: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/5.jpg)
Project 2: Path Discovery
Requirements:Create a random mazeDiscover a shortest path in a maze
GUIEither command line or graphic interfaceBetter GUI will get incentive
![Page 6: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/6.jpg)
Project 2: Specification
Create the maze
Line Maze Block Maze
Entrance
Exit
I
O
![Page 7: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/7.jpg)
Project 2: Specification
Discover the shortest path
I
O
1 2 3 4 5 760
1
0
23
4
5
7
6
X
X
XX X X
X X XX X X
X X X
X X X
X X X
X X XX X X
X X X
XX
XX
X
X
X
A Breadth-First Approach
![Page 8: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/8.jpg)
Project 3: Compress
Requirements:Give a txt file
○ Contains 52 English letters (‘a’-’z’)&(‘A’-’Z’)○ Contains ‘ ’(blanks), ‘,’ (commas), ‘.’(periods)○ Contains numbers (‘0’-’9’)
Compress the txt file by Huffman Codes○ The compressed file should be smaller than
original fileUncompress the file into original txt file
○ Should restore the original file
![Page 9: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/9.jpg)
Project 3: Specification
How to calculate the Huffman Codes?① Statistics of occurrence times of each char
② Form the Huffman Tree
③ Get the Huffman Codes from the tree
![Page 10: Data Structure Min Chen School of Computer Science and Engineering Seoul National University](https://reader031.vdocuments.net/reader031/viewer/2022020417/56649f4e5503460f94c700cf/html5/thumbnails/10.jpg)
Principles
Don’t Copy Codes from Internet Try your best for a better solution!