Welcome to the Advent Of Code 2020 !
Mutiple languages have been used :
- C
- C++
- C#
- Dart
- Go
- Java
- Javascript
- Julia
- NASM
- Python
Some problems have multiple implementations. The time complexity for part 2 is displayed (N = length of the input).
Day | Time Complexity | Language |
---|---|---|
01 | O(N ^ 2) | Julia / C++ |
02 | O(N) | Julia |
03 | O(N) | Dart |
04 | O(N) | C |
05 | O(N) | NASM / C |
06 | O(N) | Python |
07 | O(N log N) | Julia |
08 | O(N ^ 2) | Javascript |
09 | O(N) | C# |
10 | O(N) | Go / Python |
11 | O(N ^ 2) | Java |
12 | O(N) | Julia |
13 | O(N) | C++ (WIP) |
14 | O(N) | Python |
15 | O(1) | C++ |
16 | O(N ^ 2) | Julia |
17 | O(N ^ 2) | C++ |
18 | O(N) | Julia |
19 | O(N) | Python |
20 | O(N ^ 2) | Julia (WIP) |
22 | O(N) | C++ |
The input is always passed via stdin by piping.
For instance, compiled languages like C++ first compile the code :
g++ -o program 1.cpp
Note that some files contain specific instructions to compile (to build C with NASM for instance).
And then execute it :
cat 1.input | ./program
Interpreted / JIT compiled languages such as Julia need only one command :
cat 1.input | julia 1.jl
All problems have been made on x86_64 Arch Linux.
Compiled with Mono on Linux.
Javascript is executed via NodeJS.
NASM files target x86_64 linux machines.
Python version is 3.9+.