Code Monkey home page Code Monkey logo

advent-of-code-2021's Introduction

Run in linqpad 7

Not trying to be elegant or efficient, just having fun so don't judge too harshly.

Not aiming for perfection, just having fun so don't judge too harshly.

That said I really wasn't happy with my naive first attempt for day 5 which ran for ~8 seconds so I guess I do care a little about optimizing for runtime.

Results

Day Both parts included Runtime Comments Cheated
1 ✔️ 0.001 s
2 0.001 s Overwrote part 1, before I was planning on sharing
3 0.007 s Overwrote part 1, before I was planning on sharing
4 ✔️ 0.033 s
5 ✔️ 0.046 s First attempt took ~8 seconds to run for part 1
6 ✔️ 0.001 s First attempt out of memory part 2, also very long runtime
7 ✔️ 0.18 s Pretty good first try, could probably cleanup but I'm happy.
8 ✔️ 0.006 s That was a right PITA
9 ✔️ 0.010 s Rushed catching up, probably much better ways to solve.
10 ✔️ 0.001 s Sounded more fun than it was.
11 ✔️ 0.035 s Rushed catching up, probably much better ways to solve.
12 ✔️ ~6.5 s Didn't enjoy this one.
13 ✔️ 0.001 s Day 13 was really good fun!!!
14 ✔️ 0.001 s I didn't learn my lesson and ran out of memory first attempt at part 2.
15 ✔️ ~0.4 s Googled AStar which was first thing that came to mind, eventually pretty much stole someone else implementation for Dijkstra. ✔️

Day 13 plotted.

#  #  ##  #    #### ###   ##  #### #  #
#  # #  # #       # #  # #  #    # #  #
#  # #    #      #  #  # #  #   #  #  #
#  # #    #     #   ###  ####  #   #  #
#  # #  # #    #    # #  #  # #    #  #
 ##   ##  #### #### #  # #  # ####  ## 

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.