Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 17 days ago
JSON representation
My solutions for Advent of Code 2021
- Host: GitHub
- URL: https://github.com/tusharnankani/adventofcode
- Owner: tusharnankani
- Created: 2021-12-01T10:16:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-28T22:25:38.000Z (about 3 years ago)
- Last Synced: 2024-11-06T22:40:37.992Z (about 2 months ago)
- Topics: advent-of-code, advent-of-code-2021, adventofcode, cpp
- Language: C++
- Homepage: https://adventofcode.com/2021
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/)