Skip to content

stijnvermeeren/hashcode2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hash Code 2020 solution

This is a clean-up version of the Scala solution of the team Starmind Scala to the Hash Code 2020 challenge from Google.

Challenge

The details of the challenge, including the datasets, can be found in the challenge folder.

Result

This solution achieved 26,929,308 points, putting us at position 194 in the ranking, with more than 10,000 teams participating.

Team

The team consisted of Starmind employees

with additional support from

Method

Our solution is essentially a greedy search: whenever we can sign up another library, pick the one with the highest score, considering the books that will already be scanned anyway by previously selected libraries.

The score of a library is composed of...

  • The maximum value that we can still get from the library (i.e. by signing it up immediately and scanning the books that are not already scanned from other libraries from highest value to lowest value).
  • The number of days it takes to sign up this library (we essentially pick a library with maximal value per day of sign-up time).

Running

The Scala code can be compiled and executed using sbt.

sbt "runMain challenge.Main"

The output will be written to the output directory.

About

Solution that achieved 194th place in the Hash Code 2020 challenge (team Starmind Scala)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages