google-hashcode 2018

Pizza

  • Greedy algorithm which cuts a given pizza slice by slice.
  • It cuts slices from top left corner to bottom right corner preferring the biggest possible.
  • This approach reaches a total score of 901.008.

Streaming videos

  • Greedy approach to find initial solution:
    1. rate each possible (video, cache) combination by latency saving potential
    2. iterate over caches and assign not cached videos in order of rating for this cache
  • Local search algorithm to improve initial solution

Self-driving rides

  • Greedy algorithm simulating time step by step while assigning each available vehicle the best possible ride
  • This approach reaches a total score of 46.571.051.