My solutions for the course algo lab 2022 given at ETHZ. This course deals with various topics such as dynamic programming, binary search, greedy algorithms, graphs, flows, geometry and linear programming.
Name | Challenge | Solution | Points | Week | Theme |
---|---|---|---|---|---|
Build the sum | File | C++ code | 100 | 1 | STL |
Dominoes | File | C++ code | 100 | 1 | STL |
Even Pairs | File | C++ code | 100 | 1 | Combinatorics - Prefix sum |
Even Matrices | File | C++ code | 100 | 1 | Combinatorics - Prefix sum |
Beach Bars | File | C++ code | 100 | 2 | Two pointers |
Burning Coins | File | C++ code | 100 | 2 | DP |
Search Snippets | File | C++ code | 100 | 2 | Two pointers |
The Great Game | File | C++ code | 100 | 2 | DP |
Ant Challenge | File | C++ code | 100 | 3 | Graph - MST - Shortest Path |
Buddy Selection | File | C++ code | 100 | 3 | Graph - Matching |
First step with BGL | File | C++ code | 100 | 3 | Graph - BGL |
Important Bridges | File | C++ code | 100 | 3 | Graph - DFS |
Antenna | File | C++ code | 100 | 4 | Geometry |
First Hit | File | C++ code | 100 | 4 | Geometry |
Hiking Map | File | C++ code | 100 | 4 | Geometry - Two pointers |
Hit | File | C++ code | 100 | 4 | Geometry |
Asterix the Gaul | File | C++ code | 100 | 5 | Binary Search - Split & List |
Boats | File | C++ code | 100 | 5 | Greedy |
Moving Books | File | C++ code | 100 | 5 | Greedy |
Severus Snape | File | C++ code | 100 | 5 | Greedy - DP |
Diet | File | C++ code | 100 | 6 | Linear programming |
Inball | File | C++ code | 100 | 6 | Linear programming |
Maximize it! | File | C++ code | 100 | 6 | Linear programming |
Suez | File | C++ code | 100 | 6 | Linear programming |
Coin Tossing Tournament | File | C++ code | 100 | 7 | Flow |
London | File | C++ code | 100 | 7 | Flow |
Shopping Trip | File | C++ code | 100 | 7 | Flow |
Tiles | File | C++ code | 100 | 7 | Flow |
Bistro | File | C++ code | 100 | 8 | Advanced geometry |
Germs | File | C++ code | 100 | 8 | Advanced geometry |
H1N1 | File | C++ code | 100 | 8 | Advanced geometry |
Light the Stage | File | C++ code | 100 | 8 | Advanced geometry |
Algocoon | File | C++ code | 100 | 9 | Advanced flows |
Casino Royale | File | C++ code | 100 | 9 | Advanced flows |
Placing Knights | File | C++ code | 100 | 9 | Advanced flows |
Real Estate Market | File | C++ code | 100 | 9 | Advanced flows |
Clues | File | C++ code | 100 | 10 | Graphs - Matchings - Advanced geometry |
DHL | File | C++ code | 100 | 10 | DP |
New York | File | C++ code | 100 | 10 | Two pointers - Graph - DFS |
Fleetrace | File | C++ code | 100 | 10 | Advanced flows |
Asterix in Switzerland | File | C++ code | 100 | 11 | Flow |
Sith | File | C++ code | 100 | 11 | Advanced geometry - Graph - Binary search |
The Fighting Pits of Meereen | File | C++ code | 100 | 11 | DP |
World Cup | Files | C++ code | 100 | 11 | Advanced geometry - Linear programming |
Car Sharing | Files | C++ code | 100 | 12 | Advanced flows |
Lord Voldemort | Files | C++ code | 100 | 12 | DP |
On Her Majesty's Secret Service | Files | C++ code | 100 | 12 | Graph - BS |
Nemean Lion | Files | C++ code | 100 | 12 | Advanced geometry |
Marathon | Files | C++ code | 100 | 13 | Shortest path - flows |
Asterix and the Chariot Race | Files | C++ code | 100 | 13 | DP - Trees |
Evolution | Files | C++ code | 100 | 13 | Binary Search - Trees |
Idéfix | Files | C++ code | 100 | 13 | Advanced geometry - BS |
Name | Challenge | Solution | Points | Week | Theme |
---|---|---|---|---|---|
Deck of Cards | File | C++ code | 100 | 2 | Two pointers |
San Francisco | File | C++ code | 100 | 3 | DP - Graph |
Greyjoy | File | C++ code | 100 | 4 | Two pointers - Sorting |
Tracking | File | C++ code | 100 | 5 | Graph - Shortest Path |
Motorcycles | File | C++ code | 100 | 6 | Geometry |
Octopussy | File | C++ code | 100 | 7 | Greedy |
Augean Stable | File | C++ code | 100 | 8 | Linear programming |
Knights | File | C++ code | 100 | 9 | Flows |
Hands | File | C++ code | 100 | 10 | Union find & Advanced geometry |
Ceryneian Hind | File | C++ code | 100 | 11 | Flows |
Rubeus Hagrid | File | C++ code | 100 | 12 | Greedy |
Strikesback | File | C++ code | 100 | 13 | Advanced geometry & Linear programming |
Ludo Bagman | File | C++ code | 100 | 14 | Advanced flows |