Giter VIP home page Giter VIP logo

aoc-2022's Introduction

AoC-2022

My solutions to Advent of Code 2022. This year, I'm going to try doing the challenges in completly in Rust

Getting Started

git clone [email protected]:edmBernard/AoC-2022.git
cd AoC-2022
cargo build --release

Run

cargo run -- data

Test

Run each part and expect result to be from my input

cargo test

The executable is named AoC-2022. Inputs path can be specified as argument or by default in the data folder.

Problem

Day Description Tips
Day01 puzzle solution Max of range -
Day02 puzzle solution Rock Paper Scissors -
Day03 puzzle solution Duplicate in compartments -
Day04 puzzle solution Check range overlapping -
Day05 puzzle solution Stack swap -
Day06 puzzle solution Check block if duplicate -
Day07 puzzle solution Directory mapping -
Day08 puzzle solution Line of sight -
Day09 puzzle solution Move rope Using a big vec instead of HashSet
Day10 puzzle solution cycle synchronisation in CRT part2 is a visual solution
Day11 puzzle solution Monkey pass part2 overflow so we use Least common multiple-like to reduce worry level at each pass
Day12 puzzle solution Search path algorithm (BFS or Dijkstra) Start from the End and different stop condition for part1 and part2
Day14 puzzle solution Sandfall -
Day15 puzzle solution Blind spot in Sensor Area Check only points in frontier of the detected area
Day16 puzzle solution Graph search with valve Floyd-Warshall and memoization

Some Timing :

In Rust
days::day01::day01_speed       in    67.84 us : part1=70720      part2=207148
days::day02::day02_speed       in    81.44 us : part1=11475      part2=16862
days::day03::day03_speed       in    73.59 us : part1=8202       part2=2864
days::day04::day04_speed       in    62.08 us : part1=490        part2=921
days::day05::day05_speed       in    86.36 us : part1=ZWHVFWQWW  part2=HZFZCCWWV
days::day06::day06_speed       in    52.09 us : part1=1282       part2=3513
days::day07::day07             in   276.58 us : part1=1543140    part2=1117448
days::day08::day08_speed       in   257.59 us : part1=1688       part2=410400
days::day09::day09_speed       in   383.57 us : part1=6503       part2=2724
days::day10::day10             in    43.77 us : part1=11720      part2=2
days::day11::day11_speed       in  1999.36 us : part1=117624     part2=16792940265
days::day12::day12_speed       in  1567.76 us : part1=437        part2=430
days::day14::day14             in  3489.00 us : part1=1003       part2=25771
days::day15::day15_speed       in 14748.00 us : part1=5525990    part2=11756174628223
days::day16::day16             in 3734649.00 us : part1=1754       part2=2474

In C++
day01_speed_iter               in 66.7159 us : part1=70720      part2=207148
day02                          in 67.3343 us : part1=11475      part2=16862
day03                          in 55.5822 us : part1=8202       part2=2864
day04                          in 72.6224 us : part1=490        part2=921
day05                          in 78.4286 us : part1=ZWHVFWQWW  part2=HZFZCCWWV

aoc-2022's People

Contributors

edmbernard avatar

Stargazers

 avatar

Watchers

 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.