COS 216: Algorithms
Spring 2024
Kattis
From time to time, I will assign (small) programming projects for you to try putting theory into practice.
Instructions
-
Create a Kattis account.
(Note that their TOS requires that you use your real name; if you are concerned about privacy, you may turn on "anonymous mode" in your profile.)
-
Solve the problem guessthedatastructure.
-
You may use any programming language supported by Kattis.
However, I strongly recommend using Python as a first choice, and Java as a second choice.
(I solved all the problems using Python, so it is definitely doable and fast enough.)
-
Submit your code to Kattis.
You get near-instant feedback and as many tries as you want to correct your code!
-
Once Kattis accepts your code, submit to Moodle:
- a screenshot (I know, I know) of the submission screen (like this)
- your code
The screenshot helps us know that Kattis already checked your code!
Tips
Before solving the actual assigned problem, if this is your first time using Kattis, I recommend the following.
-
You will be reading from standard input and producing standard output.
Read the help section of your language of choice to see how to do that.
-
Start with problem hello: just print "Hello World!" to make sure everything is working.
-
Then try timeloop: to make sure you can read and deal with input.
-
Now go back and do the actual assigned problem above.
Optional
-
Use a programming language you do not yet know, as an opportunity to learn new languages.
(This is especially true if you only know one of Python or Java; learn the other one!)
-
Try various problems and see what you can solve!
-
Can you catch up to me?
-
If you're interested in officially entering competitions, talk to me.