Algorithms and advanced data structures