Coder Social home page Coder Social logo

go_hc19's Introduction

Google Hash Code 2019

Hash Code is a coding competition organized by Google where teams from all over the world compete in solving exciting engineering problems.

This is a Google Hash Code 2019 solution: Problem statement.

Disclaimer: The goal of this project was not necessarily to achieve the highest score possible, but to get to know golang and play around with its features. Our solution achieves a score of around 509400, which would be equivalent to about the 1470th place out of 6640 participants.

Build & Run

git clone https://github.com/baurst/go_hc19
cd go_hc19
go run .

By default, the solver will run on all of the following datasets in parallel:

  • a_example.txt
  • b_lovely_landscapes.txt
  • c_memorable_moments.txt
  • d_pet_pictures.txt
  • e_shiny_selfies.txt

If you would like to solve a subset of the problems, use the flag --datasets for example like so: --datasets b_lovely_landscapes.txt. The tool will create a directory called out and save each solution in a seperate file, reporting the respective score.

Highly subjective takeaways about doing coding competitions with Golang

  • due to Golangs small feature set and explicit style, you end up writing slightly more code than you would in Python, C++ or Rust
  • this makes good preparation essential: Have your boilerplate ready for data loading, writing solutions and asynchronous problem solving etc.
  • the lack of functional programming (map, filter and reduce) negatively impacts coding speed
  • the ease with which you can run goroutines asynchronously is just great

Team Members

go_hc19's People

Contributors

baurst avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.