How to get the credit
- To get the credit you need at least 90 points from homework
assignments.
- There will be at least 12 assignments worth at least 140 points.
- You need to follow the rules
- Read the rules very carefully and consult the instructor if anything is not clear! Not knowing the
rules is no excuse if you accidentally break them.
How the practicals work
- Practicals are taught via Zoom. Credentials will be sent via e-mail
before the first practical. If you didn't receive the credentials (or lost
them), contact the
instructor.
- Presence at the practicals is not mandatory, but recommended. You should at
least join the first session where the rules and system is explained.
- New assignments and solution to the expired assignments will be presented
at the practical.
- The main part is a Q&A session. We discuss questions
and issues concerning the lecture, assignments etc.
- There will be also some exercises that should help you better understand
the topics from the lecture.
Do not be afraid to ask questions! (either during the practicals or
via e-mail). In the worst case, you just learn nothing new :-).
Exercises
4.3.
11.3.:
Intro to splay trees and
lecture notes
18.3.
25.3.
1.4.
8.4.
22.4.
29.4.
6. 5.: Polynomial hashing of strings and Rabin-Karp,
recording is available on the
course
webpage. See also the
lecture
notes.
13. 5.: Bloom filters,
recording is available on the
course
webpage. See also the
lecture
notes.
3.6.
Assignments
- General information in the rules
- All assignments are submitted using ReCodEx system (event the experimental
ones).
- Please join the ReCodEx group corresponding to these practicals.
- Instructor's feedback to your solutions will also be in ReCodEx (can be useful to set up mail
notifications).
- Materials for assignments (source codes etc.) will be published to
the git
repository.
Few suggestions:
- Start early. All-nighters just before deadline have a certain charm but
you can be quite sure that the instructor won't answer your question at 3 a.m.
Also, programming under the influence of sleep deprivation and litres of
caffeine has usually quite negative effect on the quality and functionality of the code.
- Read the assignment instructions carefully and do not start coding right
away -- begin by analyzing the problem using pen and paper. Do you really understand
how the data structure works? And what about the edge cases?
- Write a clean and nice code. Do not be fooled by the automated test
system -- the instructor is going to read your code. And he can (and will) give
you negative points for nasty hacks (or positive points for particularly nice
implementation). You may use the code templates for the assignments as an
inspiration. By the way, more comments or long variable names does not
necessarily mean nicer code -- sometimes less is more.
- Test you code! Do you change the data structure during the operation?
What about some assertions or conditions to check the invariants of the data
structure? Is your heap falling apart? Why not draw its structure during the
operations by some tool such as DOT?
- Do not over-optimize your code. Time and memory constraints should be
generous enough so that your implementation should pass as long as it has
correct asymptotic complexity and does not do any crazy stuff. It is usually better to
have a nice clean code that does small amount of extra work than super-duper
optimized spaghetti that not even you can really understand.
If you get stuck you can try:
Language intermezzo
Implementation assignments can be submitted either in Python 3 or in C++17. More
detailed parameters, such as compiler options, can be found in ReCodEx. If you do
not know C++ but you know C, do not despair! It is recommended to use C++ as if it
was plain old C (perhaps with exception of C++ vectors), so you can ignore most of
the features the C++ has.
If you know neither C++ nor Python there are references to documentation and
some tutorials below. And, as always, you can ask the instructor.
If you are unsure which language to choose I personally would recommend
Python. I consider it to be more beginner-friendly and perhaps more useful in
general. Either way, I would definitely recommend using the language you
feel comfortable with.
Python
C++