Coder Social home page Coder Social logo

google-code-jam's Introduction

Google Code Jam

This is a collection of my solutions to various challenges from Google’s Code Jam, the well-known international competition hosted by Google. Most of these challenges include different mathematical and computer science concepts that normally appear in everyday computing problems such as recursion, loops, formatted output, file I/O, data structures, and more. I try to solve as many challenges as possible, and add them all to this repository. All solutions are coded in Python.

All challenges are sorted by year of publication. You can find a description of each challenge and solution, as well as instruction to execute the programs on each folder.

Jump to folder:

2017
2016
2015
2014


Related: Check out my Google Hash Code submissions

  /$$$$$$                                /$$                  /$$$$$$                  /$$                    /$$$$$                        
 /$$__  $$                              | $$                 /$$__  $$                | $$                   |__  $$                        
| $$  \__/  /$$$$$$   /$$$$$$   /$$$$$$ | $$  /$$$$$$       | $$  \__/  /$$$$$$   /$$$$$$$  /$$$$$$             | $$  /$$$$$$  /$$$$$$/$$$$ 
| $$ /$$$$ /$$__  $$ /$$__  $$ /$$__  $$| $$ /$$__  $$      | $$       /$$__  $$ /$$__  $$ /$$__  $$            | $$ |____  $$| $$_  $$_  $$
| $$|_  $$| $$  \ $$| $$  \ $$| $$  \ $$| $$| $$$$$$$$      | $$      | $$  \ $$| $$  | $$| $$$$$$$$       /$$  | $$  /$$$$$$$| $$ \ $$ \ $$
| $$  \ $$| $$  | $$| $$  | $$| $$  | $$| $$| $$_____/      | $$    $$| $$  | $$| $$  | $$| $$_____/      | $$  | $$ /$$__  $$| $$ | $$ | $$
|  $$$$$$/|  $$$$$$/|  $$$$$$/|  $$$$$$$| $$|  $$$$$$$      |  $$$$$$/|  $$$$$$/|  $$$$$$$|  $$$$$$$      |  $$$$$$/|  $$$$$$$| $$ | $$ | $$
 \______/  \______/  \______/  \____  $$|__/ \_______/       \______/  \______/  \_______/ \_______/       \______/  \_______/|__/ |__/ |__/
                               /$$  \ $$                                                                                                    
                              |  $$$$$$/                                                                                                    
                               \______/    


 (                        (           (          (                               
 )\ )              (  (   )\   (      )\         )\ )   (      (      )     )    
(()/(     (    (   )\))( ((_) ))\   (((_)   (   (()/(  ))\     )\  ( /(    (     
 /(_))_   )\   )\ ((_))\  _  /((_)  )\___   )\   ((_))/((_)   ((_) )(_))   )\  ' 
(_)) __| ((_) ((_) (()(_)| |(_))   ((/ __| ((_)  _| |(_))    _ | |((_)_  _((_))  
  | (_ |/ _ \/ _ \/ _` | | |/ -_)   | (__ / _ \/ _` |/ -_)  | || |/ _` || '  \() 
   \___|\___/\___/\__, | |_|\___|    \___|\___/\__,_|\___|   \__/ \__,_||_|_|_|  
                  |___/ 

 _______    ______   ______   _______    __       ______       ______   ______   ______   ______       _________  ________   ___ __ __     
/______/\  /_____/\ /_____/\ /______/\  /_/\     /_____/\     /_____/\ /_____/\ /_____/\ /_____/\     /________/\/_______/\ /__//_//_/\    
\::::__\/__\:::_ \ \\:::_ \ \\::::__\/__\:\ \    \::::_\/_    \:::__\/ \:::_ \ \\:::_ \ \\::::_\/_    \__.::.__\/\::: _  \ \\::\| \| \ \   
 \:\ /____/\\:\ \ \ \\:\ \ \ \\:\ /____/\\:\ \    \:\/___/\    \:\ \  __\:\ \ \ \\:\ \ \ \\:\/___/\     /_\::\ \  \::(_)  \ \\:.      \ \  
  \:\\_  _\/ \:\ \ \ \\:\ \ \ \\:\\_  _\/ \:\ \____\::___\/_    \:\ \/_/\\:\ \ \ \\:\ \ \ \\::___\/_    \:.\::\ \  \:: __  \ \\:.\-/\  \ \ 
   \:\_\ \ \  \:\_\ \ \\:\_\ \ \\:\_\ \ \  \:\/___/\\:\____/\    \:\_\ \ \\:\_\ \ \\:\/.:| |\:\____/\    \: \  \ \  \:.\ \  \ \\. \  \  \ \
    \_____\/   \_____\/ \_____\/ \_____\/   \_____\/ \_____\/     \_____\/ \_____\/ \____/_/ \_____\/     \_____\/   \__\/\__\/ \__\/ \__\/
               
               
 ██████╗  ██████╗  ██████╗  ██████╗ ██╗     ███████╗     ██████╗ ██████╗ ██████╗ ███████╗         ██╗ █████╗ ███╗   ███╗
██╔════╝ ██╔═══██╗██╔═══██╗██╔════╝ ██║     ██╔════╝    ██╔════╝██╔═══██╗██╔══██╗██╔════╝         ██║██╔══██╗████╗ ████║
██║  ███╗██║   ██║██║   ██║██║  ███╗██║     █████╗      ██║     ██║   ██║██║  ██║█████╗           ██║███████║██╔████╔██║
██║   ██║██║   ██║██║   ██║██║   ██║██║     ██╔══╝      ██║     ██║   ██║██║  ██║██╔══╝      ██   ██║██╔══██║██║╚██╔╝██║
╚██████╔╝╚██████╔╝╚██████╔╝╚██████╔╝███████╗███████╗    ╚██████╗╚██████╔╝██████╔╝███████╗    ╚█████╔╝██║  ██║██║ ╚═╝ ██║
 ╚═════╝  ╚═════╝  ╚═════╝  ╚═════╝ ╚══════╝╚══════╝     ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝     ╚════╝ ╚═╝  ╚═╝╚═╝     ╚═╝


╔═╗┌─┐┌─┐┌─┐┬  ┌─┐  ╔═╗┌─┐┌┬┐┌─┐   ╦┌─┐┌┬┐
║ ╦│ ││ ││ ┬│  ├┤   ║  │ │ ││├┤    ║├─┤│││
╚═╝└─┘└─┘└─┘┴─┘└─┘  ╚═╝└─┘─┴┘└─┘  ╚╝┴ ┴┴ ┴ 


 ____                              ___                ____                __                _____                           
/\  _`\                           /\_ \              /\  _`\             /\ \              /\___ \                          
\ \ \L\_\    ___     ___      __  \//\ \       __    \ \ \/\_\    ___    \_\ \      __     \/__/\ \     __       ___ ___    
 \ \ \L_L   / __`\  / __`\  /'_ `\  \ \ \    /'__`\   \ \ \/_/_  / __`\  /'_` \   /'__`\      _\ \ \  /'__`\   /' __` __`\  
  \ \ \/, \/\ \L\ \/\ \L\ \/\ \L\ \  \_\ \_ /\  __/    \ \ \L\ \/\ \L\ \/\ \L\ \ /\  __/     /\ \_\ \/\ \L\.\_ /\ \/\ \/\ \ 
   \ \____/\ \____/\ \____/\ \____ \ /\____\\ \____\    \ \____/\ \____/\ \___,_\\ \____\    \ \____/\ \__/.\_\\ \_\ \_\ \_\
    \/___/  \/___/  \/___/  \/___L\ \\/____/ \/____/     \/___/  \/___/  \/__,_ / \/____/     \/___/  \/__/\/_/ \/_/\/_/\/_/
                              /\____/                                                                                       
                              \_/__/ 

                                                                                                                                                                                                                                                           
                                                                                                                                                             dddddddd                                                                                      
        GGGGGGGGGGGGG                                                     lllllll                                  CCCCCCCCCCCCC                             d::::::d                                   JJJJJJJJJJJ                                        
     GGG::::::::::::G                                                     l:::::l                               CCC::::::::::::C                             d::::::d                                   J:::::::::J                                        
   GG:::::::::::::::G                                                     l:::::l                             CC:::::::::::::::C                             d::::::d                                   J:::::::::J                                        
  G:::::GGGGGGGG::::G                                                     l:::::l                            C:::::CCCCCCCC::::C                             d:::::d                                    JJ:::::::JJ                                        
 G:::::G       GGGGGG   ooooooooooo      ooooooooooo      ggggggggg   gggggl::::l     eeeeeeeeeeee          C:::::C       CCCCCC   ooooooooooo       ddddddddd:::::d     eeeeeeeeeeee                     J:::::J  aaaaaaaaaaaaa      mmmmmmm    mmmmmmm   
G:::::G               oo:::::::::::oo  oo:::::::::::oo   g:::::::::ggg::::gl::::l   ee::::::::::::ee       C:::::C               oo:::::::::::oo   dd::::::::::::::d   ee::::::::::::ee                   J:::::J  a::::::::::::a   mm:::::::m  m:::::::mm 
G:::::G              o:::::::::::::::oo:::::::::::::::o g:::::::::::::::::gl::::l  e::::::eeeee:::::ee     C:::::C              o:::::::::::::::o d::::::::::::::::d  e::::::eeeee:::::ee                 J:::::J  aaaaaaaaa:::::a m::::::::::mm::::::::::m
G:::::G    GGGGGGGGGGo:::::ooooo:::::oo:::::ooooo:::::og::::::ggggg::::::ggl::::l e::::::e     e:::::e     C:::::C              o:::::ooooo:::::od:::::::ddddd:::::d e::::::e     e:::::e                 J:::::j           a::::a m::::::::::::::::::::::m
G:::::G    G::::::::Go::::o     o::::oo::::o     o::::og:::::g     g:::::g l::::l e:::::::eeeee::::::e     C:::::C              o::::o     o::::od::::::d    d:::::d e:::::::eeeee::::::e                 J:::::J    aaaaaaa:::::a m:::::mmm::::::mmm:::::m
G:::::G    GGGGG::::Go::::o     o::::oo::::o     o::::og:::::g     g:::::g l::::l e:::::::::::::::::e      C:::::C              o::::o     o::::od:::::d     d:::::d e:::::::::::::::::e      JJJJJJJ     J:::::J  aa::::::::::::a m::::m   m::::m   m::::m
G:::::G        G::::Go::::o     o::::oo::::o     o::::og:::::g     g:::::g l::::l e::::::eeeeeeeeeee       C:::::C              o::::o     o::::od:::::d     d:::::d e::::::eeeeeeeeeee       J:::::J     J:::::J a::::aaaa::::::a m::::m   m::::m   m::::m
 G:::::G       G::::Go::::o     o::::oo::::o     o::::og::::::g    g:::::g l::::l e:::::::e                 C:::::C       CCCCCCo::::o     o::::od:::::d     d:::::d e:::::::e                J::::::J   J::::::Ja::::a    a:::::a m::::m   m::::m   m::::m
  G:::::GGGGGGGG::::Go:::::ooooo:::::oo:::::ooooo:::::og:::::::ggggg:::::gl::::::le::::::::e                 C:::::CCCCCCCC::::Co:::::ooooo:::::od::::::ddddd::::::dde::::::::e               J:::::::JJJ:::::::Ja::::a    a:::::a m::::m   m::::m   m::::m
   GG:::::::::::::::Go:::::::::::::::oo:::::::::::::::o g::::::::::::::::gl::::::l e::::::::eeeeeeee          CC:::::::::::::::Co:::::::::::::::o d:::::::::::::::::d e::::::::eeeeeeee        JJ:::::::::::::JJ a:::::aaaa::::::a m::::m   m::::m   m::::m
     GGG::::::GGG:::G oo:::::::::::oo  oo:::::::::::oo   gg::::::::::::::gl::::::l  ee:::::::::::::e            CCC::::::::::::C oo:::::::::::oo   d:::::::::ddd::::d  ee:::::::::::::e          JJ:::::::::JJ    a::::::::::aa:::am::::m   m::::m   m::::m
        GGGGGG   GGGG   ooooooooooo      ooooooooooo       gggggggg::::::gllllllll    eeeeeeeeeeeeee               CCCCCCCCCCCCC   ooooooooooo      ddddddddd   ddddd    eeeeeeeeeeeeee            JJJJJJJJJ       aaaaaaaaaa  aaaammmmmm   mmmmmm   mmmmmm
                                                                   g:::::g                                                                                                                                                                                 
                                                       gggggg      g:::::g                                                                                                                                                                                 
                                                       g:::::gg   gg:::::g                                                                                                                                                                                 
                                                        g::::::ggg:::::::g                                                                                                                                                                                 
                                                         gg:::::::::::::g                                                                                                                                                                                  
                                                           ggg::::::ggg                                                                                                                                                                                    
                                                              gggggg    
                              
_________                       ______           _________       _________           _________                    
__  ____/______ ______ _______ ____  /_____      __  ____/______ ______  /_____      ______  /______ ________ ___ 
_  / __  _  __ \_  __ \__  __ `/__  / _  _ \     _  /     _  __ \_  __  / _  _ \     ___ _  / _  __ `/__  __ `__ \
/ /_/ /  / /_/ // /_/ /_  /_/ / _  /  /  __/     / /___   / /_/ // /_/ /  /  __/     / /_/ /  / /_/ / _  / / / / /
\____/   \____/ \____/ _\__, /  /_/   \___/      \____/   \____/ \__,_/   \___/      \____/   \__,_/  /_/ /_/ /_/ 
                       /____/                                                                                                                                                                                                                                                                                                                                             


_____/\\\\\\\\\\\\___________________________________________/\\\\\\____________________________________/\\\\\\\\\_______________________/\\\________________________________/\\\\\\\\\\\____________________________________        
 ___/\\\//////////___________________________________________\////\\\_________________________________/\\\////////_______________________\/\\\_______________________________\/////\\\///_____________________________________       
  __/\\\___________________________________________/\\\\\\\\_____\/\\\_______________________________/\\\/________________________________\/\\\___________________________________\/\\\________________________________________      
   _\/\\\____/\\\\\\\_____/\\\\\________/\\\\\_____/\\\////\\\____\/\\\________/\\\\\\\\_____________/\\\_________________/\\\\\___________\/\\\______/\\\\\\\\____________________\/\\\______/\\\\\\\\\_______/\\\\\__/\\\\\___     
    _\/\\\___\/////\\\___/\\\///\\\____/\\\///\\\__\//\\\\\\\\\____\/\\\______/\\\/////\\\___________\/\\\_______________/\\\///\\\____/\\\\\\\\\____/\\\/////\\\___________________\/\\\_____\////////\\\____/\\\///\\\\\///\\\_    
     _\/\\\_______\/\\\__/\\\__\//\\\__/\\\__\//\\\__\///////\\\____\/\\\_____/\\\\\\\\\\\____________\//\\\_____________/\\\__\//\\\__/\\\////\\\___/\\\\\\\\\\\____________________\/\\\_______/\\\\\\\\\\__\/\\\_\//\\\__\/\\\_   
      _\/\\\_______\/\\\_\//\\\__/\\\__\//\\\__/\\\___/\\_____\\\____\/\\\____\//\\///////______________\///\\\__________\//\\\__/\\\__\/\\\__\/\\\__\//\\///////______________/\\\___\/\\\______/\\\/////\\\__\/\\\__\/\\\__\/\\\_  
       _\//\\\\\\\\\\\\/___\///\\\\\/____\///\\\\\/___\//\\\\\\\\___/\\\\\\\\\__\//\\\\\\\\\\______________\////\\\\\\\\\__\///\\\\\/___\//\\\\\\\/\\__\//\\\\\\\\\\___________\//\\\\\\\\\______\//\\\\\\\\/\\_\/\\\__\/\\\__\/\\\_ 
        __\////////////_______\/////________\/////______\////////___\/////////____\//////////__________________\/////////_____\/////______\///////\//____\//////////_____________\/////////________\////////\//__\///___\///___\///__



   ______                  __        ______          __            __              
  / ____/___  ____  ____ _/ /__     / ____/___  ____/ /__         / /___ _____ ___ 
 / / __/ __ \/ __ \/ __ `/ / _ \   / /   / __ \/ __  / _ \   __  / / __ `/ __ `__ \
/ /_/ / /_/ / /_/ / /_/ / /  __/  / /___/ /_/ / /_/ /  __/  / /_/ / /_/ / / / / / /
\____/\____/\____/\__, /_/\___/   \____/\____/\__,_/\___/   \____/\__,_/_/ /_/ /_/ 
                 /____/  

google-code-jam's People

Contributors

mauropappaterra avatar

Watchers

James Cloos 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.