Code Expert exercises from the Algorithms Lab course at ETH Zürich.
A modified version of the algolabVS.sh
script is used for my specific setup, hence no portability
is guaranteed. The script is meant to be used as specified by its documentation.
These are my solutions for the exam problems. Since from the exam paper I was only able to retrieve the sample tests, there is no correctness guarantee on these rewrites. The original versions scored full points, save for Croquet for which I can only guarantee a 75/100 score.
Overall, the exam was much simpler than the general course content, and on top of the guaranteed repeat problems, MadTeaParty was also a near clone of PlacingKnights. The most challenging problem was by far Croquet, although it was possible to pick up a lot of points through individual cases.
Problem | Solution | Type |
---|---|---|
Croquet | croquet.cpp | Delaunay + Dijkstra |
QueenOfHearts | queen_of_hearts.cpp | Dijkstra + MinimumCut |
DownTheRabbitHole | down_the_rabbit_hole.cpp | RubeusHagrid Clone |
Problem | Solution | Type |
---|---|---|
RabbitClan | rabbit_clan.cpp | DP |
MadTeaParty | mad_tea_party.cpp | Bipartite MaxIS |
Chronosphere | chronosphere.cpp | Legions Clone |
This is a collection of problems for the previous years I used to prepare for the exam.
Problem | Solution | Type |
---|---|---|
AsterixInSwitzerland | asterix_in_switzerland.cpp | MaxFlow |
CarSharing | car_sharing.cpp | MinCostMaxFlow |
CeryneianHind | ceryneian_hind.cpp | |
EmpireStrikesBack | empire_strikes_back.cpp | CGAL LP + Delaunay |
Evolution | evolution.cpp | BS |
FleetRace | fleet_race.cpp | MinCostMaxFlow |
LightTheStage | light_the_stage.cpp | BS + Delaunay |
LudoBagman | ludo_bagman.cpp | MinCostMaxFlow |
Marathon | marathon.cpp | MultiPath Dijkstra + MF |
NewTiles | new_tiles.cpp | |
RevengeOfTheSith | revenge_of_the_sith.cpp | BS(really cool) + UF |
SearchSnippets | search_snippets.cpp | |
ShoppingTrip | shopping_trip.cpp | |
TheHandTourney | the_hand_tourney.cpp | BS + UF (hardcoded ifs) |
TheNemeanLion | the_nemean_lion.cpp | |
Tracking | tracking.cpp | Dijkstra |