Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tusharnankani/AdventOfCode

My solutions for Advent of Code 2021
https://github.com/tusharnankani/AdventOfCode

advent-of-code advent-of-code-2021 adventofcode cpp

Last synced: about 15 hours ago
JSON representation

My solutions for Advent of Code 2021

Awesome Lists containing this project

README

        

## AdventOfCode


My attempt at Advent of Code 2021


#### What is 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](https://github.com/search?q=advent+of+code) programming language you like. People use them as a [speed contest](https://adventofcode.com/leaderboard), [interview](https://y3l2n.com/2018/05/09/interview-prep-advent-of-code/) [prep](https://twitter.com/dznqbit/status/1037607793144938497), [company training](https://twitter.com/pgoultiaev/status/950805811583963137), [university](https://gitlab.com/imhoffman/fa19b4-mat3006/wikis/home) [coursework](https://www.gribblelab.org/scicomp2019/), [practice](https://twitter.com/mrdanielklein/status/936267621468483584) [problems](https://comp215.blogs.rice.edu/), or to [challenge each other](https://www.reddit.com/r/adventofcode/search?q=flair%3Aupping&restrict_sr=on).

~ via [About - Advent of Code 2021](https://adventofcode.com/2021/about)


### Side Learnings


Wrote a bash script to create the folder structure like this.


```
day
|__part1.cpp
|__part2.cpp
```


Find the [bash script](/go.bash) here.


```bash
for num in {1..25}
do
if [ $num -lt 10 ]
then
mkdir 0$num
cd 0$num
> 1.cpp
> 2.cpp
else
mkdir $num
cd $num
> 1.cpp
> 2.cpp
fi
cd ..
done
```


or simply 🤭

```bash
for num in {1..25}; do if [ $num -lt 10 ]; then mkdir 0$num; cd 0$num; > 1.cpp; > 2.cpp; else mkdir $num; cd $num; > 1.cpp; > 2.cpp; fi; cd ..; done
```

### Author

[Tushar Nankani](https://tusharnankani.github.io/about/)