Coder Social home page Coder Social logo

atg-abhijay / advent-of-code-2020 Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 2.01 MB

Challenging puzzle-like problems requiring novel approaches and creative thinking

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

Python 100.00%
coding-challenges coding-interviews advent-of-code advent-of-code-2020 tech-interviews

advent-of-code-2020's Introduction

From the About page of Advent of Code -

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.

Current Status: ๐ŸŒŸ 50 stars ๐ŸŒŸ

current-status.mov

How to Use

The file for the puzzle input must be located in the same directory as the solution and it must have the name advent-XX-input.txt for Day XX. Simply run python advent-XX.py for Day XX. The program will prompt you to enter either 1 or 2 for answers for Part 1 or Part 2 respectively. For example -

Example use

Cyclomatic Complexity

The Cyclomatic Complexity of the solutions can be found in the table below. It is a metric that can be used to calculate the complexity of a program. These values were calculated using radon, which is a tool for Python to calculate code metrics.

Information about radon's usage of it can be found here.

Solution Complexity Solution Complexity Solution Complexity
Day 01 A (3.25) Day 10 A (3.14) Day 19 A (4.88)
Day 02 A (3.67) Day 11 A (4.89) Day 20 B (5.88)
Day 03 A (2.25) Day 12 A (3.14) Day 21 A (3.00)
Day 04 A (4.00) Day 13 A (4.00) Day 22 A (4.00)
Day 05 A (4.60) Day 14 A (4.00) Day 23 A (2.75)
Day 06 A (3.00) Day 15 A (2.67) Day 24 A (4.14)
Day 07 A (2.71) Day 16 A (3.71) Day 25 A (2.00)
Day 08 A (3.60) Day 17 A (4.44)
Day 09 A (3.75) Day 18 A (3.25)

The scores, sourced from the radon documentation here, can be understood as follows -

CC Score Rank Risk
1 - 5 A low - simple block
6 - 10 B low - well structured and stable block
11 - 20 C moderate - slightly complex block
21 - 30 D more than moderate - more complex block
31 - 40 E high - complex block, alarming
41+ F very high - error-prone, unstable block

advent-of-code-2020's People

Contributors

atg-abhijay avatar

Stargazers

 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.