Coder Social home page Coder Social logo

zecookiez / adventofcode2020 Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 146 KB

A series of challenges in the spirit of the holidays ๐ŸŽ„

Home Page: https://adventofcode.com/2020/

Python 100.00%
advent-of-code advent-of-code-2020 aoc2020 aoc

adventofcode2020's Introduction

AdventOfCode2020

A series of challenges in the spirit of the holidays ๐ŸŽ„

All of these solutions will be written and verified with Python with the following goals in mind:

  1. Efficiency, where an efficient algorithm will do the job without over-killing the problem. I am aiming for a cumulative sub-15 seconds using plain Python (no PyPy or JIT compilers) for these tasks.
  2. Organization. Avoid duplicate code for better readability and modularity. No ๐Ÿ code!
  3. Keep it simple!

Notable Nights

  • Day 1: Site went down, and apparently I did not refresh it fast enough.
  • Day 3: Kept the extra newlines in the data, immediately regretted my decision.
  • Day 9: Two lessons learned: always preprocess input, and always go for the simpler solution (unless it's too slow but I should've checked).
  • Day 10: Should've read the end of the problem first, because I solved the wrong problem for part 1.
  • Day 12: Getting good sleep is important!
  • Day 14: Reading is hard ;-;
  • Day 18: Took a "nap" and woke up way after the contest began...
  • Day 21: I don't understand how I misunderstood the problem this badly.
  • Day 22: Lost all my time from a misleading example and a hidden key point. The bad streak continues...
  • Day 23: The bad streak continues... The good news is that I completed all of my schoolwork so I can focus on AOC now :)
  • Day 24: The bad streak continues...

Tasks

Day Name Part 1 Part 2 Points Runtime
1 Report Repair 622nd 545th 0 1ms
2 Password Philosophy 24th 34th 77 + 67 = 144 2ms
3 Toboggan Trajectory 306th 174th 0 1ms
4 Passport Processing 139th 51st 0 + 50 = 50 4ms
5 Binary Boarding 39th 22nd 62 + 79 = 141 2ms
6 Custom Customs 113th 23rd 0 + 78 = 78 2ms
7 Handy Haversacks 14th 24th 87 + 77 = 164 4ms
8 Handheld Halting 52nd 23rd 49 + 78 = 127 10ms
9 Encoding Error 261st 817th 0 5ms
10 Adapter Array 255th 50th 0 + 51 = 51 1ms
11 Seating System 20th 21st 81 + 80 = 161 349ms
12 Rain Risk 455th 228th 0 1ms
13 Shuttle Search 29th 53rd 72 + 48 = 120 1ms
14 Docking Data 155th 456th 0 32ms
15 Rambunctious Recitation 251st 73rd 0 + 28 = 28 5373ms
16 Ticket Translation 90th 72nd 11 + 29 = 40 26ms
17 Conway Cube 14th 18th 87 + 83 = 170 302ms
18 Operation Order 3016th 1753rd 0 36ms
19 Monster Messages 404th 132nd 0 133ms
20 Jurassic Jigsaw 236th 158th 0 228ms
21 Allergen Assessment 1026th 647th 0 3ms
22 Crab Combat 117th 263rd 0 1370ms
23 Crab Cups 614th 139th 0 5985ms
24 Lobby Layout 368th 173rd 0 208ms
25 Combo Breaker 392nd 321st :( 919ms

Current score: 1274 points

Total runtime: 14998 milliseconds (under the 15 second limit by 2ms!)

Calendar Art

Credits to Eric Wastl (the creator of AOC) for the amazing ASCII calendar art!

Final Reflections

  • Keeping some templates would be nice (double newline input parsing, bipartite matching, linked list)
  • I should brush up on regexes
  • I should practice number theory and linked lists problems
  • Be less afraid of attempting backtracking
  • Set an alarm for 30 minutes before every night
  • Reading skills are important ;-;
  • Debugging skills are important ;-;

With that being said, I am more than happy about my performance this year. This is not only the first year I've made it to the top 100, but the first year I completed all 25 days as well. Looking forward to Advent of Code 2021!

adventofcode2020's People

Contributors

zecookiez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  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.