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.
- 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
Part 1: 84 chars | Part 2: 129 chars
Part 1: 116 chars | Part 2: 119 chars
Part 1: 168 chars | Part 2: 178 chars
Part 1: 138 chars | Part 2: 136 chars
Part 1: 393 chars | Part 2: 384 chars
Part 1: 101 chars | Part 2: 103 chars
Part 1: 415 chars | Part 2: 434 chars
Part 1: 339 chars | Part 2: >1k chars
Part 1: >1k chars | Part 2: >1k chars
Part 1: 129 chars | Part 2: 158 chars
Part 1: >1k chars | Part 2: >1k chars
Part 1: >2k chars | Part 2: >2k chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: - chars | Part 2: - chars
Part 1: >1k chars | Part 2: >1k chars
Part 1: >1k chars | Part 2: >1k chars
Part 1: >1k chars | Part 2: >1k chars
Part 1: >1k chars | Part 2: >1k chars
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.