AdventOfCode 2022 in Dart focusing on code golf, making the solutions as small as possible

Overview

Advent of Code 2022 in Dart (Code Golf)

This is my attempt at solving the Advent of Code 2022 puzzles in the shortest possible code using Dart 2.18.

You can find the solution in /bin.

I created .min.dart file containing the shortest possible code for each puzzle.

The normal dart files are the same code I used to solve the puzzles in the first place before starting to code golf the solutions.

Rules

  • The Dart program has to have a main(List<String> args) entrypoint.
  • The input is read from file and passed into the main function line by line.
  • External dependencies are not allowed.
  • The output is printed via print()

See the mainTester() function as reference

Results

Day 1

Part 1: 84 chars | Part 2: 129 chars

Day 2

Part 1: 116 chars | Part 2: 119 chars

Day 3

Part 1: 168 chars | Part 2: 178 chars

Day 4

Part 1: 138 chars | Part 2: 136 chars

Day 5

Part 1: 393 chars | Part 2: 384 chars

Day 6

Part 1: 101 chars | Part 2: 103 chars

Day 7

Part 1: 415 chars | Part 2: 434 chars

Day 8

Part 1: 339 chars | Part 2: >1k chars

Day 9

Part 1: >1k chars | Part 2: >1k chars

Day 10

Part 1: 129 chars | Part 2: 158 chars

Day 11

Part 1: >1k chars | Part 2: >1k chars

Day 12

Part 1: >2k chars | Part 2: >2k chars

Day 13

Part 1: - chars | Part 2: - chars

Day 14

Part 1: - chars | Part 2: - chars

Day 15

Part 1: - chars | Part 2: - chars

Day 16

Part 1: - chars | Part 2: - chars

Day 17

Part 1: - chars | Part 2: - chars

Day 18

Part 1: - chars | Part 2: - chars

Day 19

Part 1: - chars | Part 2: - chars

Day 20

Part 1: - chars | Part 2: - chars

Day 21

Part 1: >1k chars | Part 2: >1k chars

Day 22

Part 1: >1k chars | Part 2: >1k chars

Day 23

Part 1: >1k chars | Part 2: >1k chars

Day 24

Part 1: >1k chars | Part 2: >1k chars

License

Copyright 2022 Pascal Welsch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

You might also like...

HappyNewYearAnimation-using-Flutter - A very delightful Welcome to 2022 with Flutter 🎉🎊🎆

happynewyearapp A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Jan 1, 2022

A project made for the ECV Digital 2022. 🌐 The goal being to make a Flutter application to connect, register and display information of a given API.👨🏼🔧

not_netflix A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

May 7, 2022

Hack&Heal hybrid hackathon 2022 - Body & Mind topic

Hack&Heal hybrid hackathon 2022 - Body & Mind topic

Meditation App Hack&Heal hybrid hackathon 2022 - Body & Mind topic The MVP is available for mobile browsers here. The Problem 3.6 million citizens hav

Jun 19, 2022

SPAJAM 2022 app by Flutter Lovers team.

spajam2022 A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Dec 26, 2022

SPAJAM 2022 final round app by Flutter Lovers team.

spajam2022final A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Dec 15, 2022

This project is created for Hactoberfest 2022 - EXCLUDED

This project is created for Hactoberfest 2022 - EXCLUDED

Hacktoberfest 2022 - EXCLUDED PROJECT DO NOT CONTRIBUTE Hacktoberfest is a month-long global celebration of open source software run by DigitalOcean i

Oct 19, 2022

Flutter Based Application For Task Organization ( KanBan Board ), Hacktober 2022 accepted.

Make your first Pull Request on Hacktoberfest 2022. Don't forget to spread love and if you like give us a ⭐️ Flutter Based Application For Task Organization ( KanBan Board ), Hacktober 2022 accepted.

Oct 27, 2022

Built-in Cam Cloud Service(2022 Embeded SW Contest/Car & Mobility)

Built-in Cam Cloud Service(2022 Embeded SW Contest/Car & Mobility)

BCCS (Built-in Cam Cloud System) 목차 작품 소개 작품 시연 어플리케이션 UI Hardware 구성 Software 구성 기술스택 1. 작품 소개 작품 설명 본 시스템은 차량에서 발생한 이벤트를 별도의 저장소 없이 클라우드에서 관리하여 자료의

Oct 12, 2022

Flutter (web) app for the DevFest 2022 in HH, containing my slides as well as the examples used to talk about navigation

go_go_router A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Dec 15, 2022
Owner
Pascal Welsch
Google Developer Expert for Flutter / CTO of phntm.xyz / Co-founder of @wiredashio / speaker / cat-lover https://fluttercommunity.social/@passsy
Pascal Welsch
Kullanmaya hazir widget cozumleri -Ready to use widget solutions

Ready to use widgets ( ???? ) Projelerimde yararlı widget çözümleri kullanıyorum ve çoğu zaman orada kalıyor. Bunları hem ben hemde sizden gelenler il

Veli Bacik 117 Dec 27, 2022
Spider - A small dart library to generate Assets dart code from assets folder.

Spider A small dart library to generate Assets dart code from assets folder. It generates dart class with static const variables in it which can be us

Birju Vachhani 159 Nov 8, 2022
Code for Flutter Talk from Flutter Vikings 2022: Custom User Interactions in Flutter

Custom User Interactions - Flutter Vikings 2022 A companion app for the Flutter Vikings 2022 talk - Custom User Interactions with Shortcuts, Intents,

Justin McCandless 9 Sep 16, 2022
In this app, it's possible to find some different kind of flutter animations

flutter_animations Apprendre à utiliser les animations avec Flutter Getting Started This project is a starting point for a Flutter application. A few

MOISE Rajesearison 0 Dec 24, 2021
Makes it possible to safely execute and retry a Future inside a StatelessWidget

futuristic Makes it possible to safely execute and retry a Future inside a StatelessWidget. See the Mainstream package for a similar API for working w

Martin Rybak 28 Sep 15, 2022
Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform spe

Gillian 33 Dec 18, 2022
Another breakpoint framework. Aims to simplify as much as possible building adaptive layouts.

Another breakpoint framework. Aims to simplify as much as possible building adaptive layouts. Features Really simple implementation Works with and wit

null 3 Sep 26, 2022
A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

r_scan A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your iss

PengHui Li 112 Nov 11, 2022
An app for small and medium organizations (SME) manager, with NFC-tag, e-tag and QR code features supported.

BK LAB Manager - an app for group management 1. Getting Started An app for small and medium organizations (SME) manager, with NFC-tag, e-tag and QR co

Andrew Ng 9 Dec 11, 2022