What We Did Today:
- Introduced Data Structures and Algorithms (DSA)
- Started Shell Game implementation
Homework:
Submit into the google drive here when you are finished!
- Continue the shell game problem, and implement your solution! https://usaco.org/index.php?page=viewproblem2&cpid=891
- Hint: You have to use two for loops, one for the number of initial positions, and one more for the number of swaps
- You have been shown how to get input from a file, so you can use the input as a list where each element is a string. Strings such as “2 1 1” can be parsed with .charAt()
- Note: input files (shell.in) have to be a text file in the same directory as “src” (not inside src)
Notes:
You can reach out to me at ddjapri@ayclogic.com if you have any questions!
You can find class notes here.