"Alan Turing" Building (Blocco 0)
GPG Key: 0xCCEFF2F7
Intruduction to laboratory exercises: exercises format, writing, compiling, evaluating, and debugging a solution. Programming tips, assertions.
The STL library: overview, basic types, containers (arrays, vectors, deques, queues, stacks, (muti-)sets, maps, priority queues), iterators, some algorithms (heaps and sorting).
Material: Introduction to laboratory excercises, The STL library (1st part), STL library documentation.
The STL library (cont.): sorting, permutations, values queries, transformations, the reduce operation, linear search, binary search, operation on sets, copying collections, initializing collections, deleting and replacing elements.
The prefix sums technique. Conting the number of contiguous subsequence with even total sum: cubic-, quadratic-, and linear-time solutions.
Sorting and binary searching with predicates. Computing good upper bounds using exponential search.
Material: The STL library (2nd part), The prefix sums technique, Binary search, exponential search.
Laboratory. Problem Set 1, Test cases for "asteroid mining", Test cases for "number station".
Solutions1: asteroid_mining.cpp, number_station.cpp