diff --git a/1-example/Makefile b/1-elevator/Makefile similarity index 100% rename from 1-example/Makefile rename to 1-elevator/Makefile diff --git a/1-example/README.md b/1-elevator/README.md similarity index 100% rename from 1-example/README.md rename to 1-elevator/README.md diff --git a/1-example/go.Dockerfile b/1-elevator/go.Dockerfile similarity index 100% rename from 1-example/go.Dockerfile rename to 1-elevator/go.Dockerfile diff --git a/1-example/js.Dockerfile b/1-elevator/js.Dockerfile similarity index 100% rename from 1-example/js.Dockerfile rename to 1-elevator/js.Dockerfile diff --git a/1-example/php.Dockerfile b/1-elevator/php.Dockerfile similarity index 100% rename from 1-example/php.Dockerfile rename to 1-elevator/php.Dockerfile diff --git a/1-example/py.Dockerfile b/1-elevator/py.Dockerfile similarity index 100% rename from 1-example/py.Dockerfile rename to 1-elevator/py.Dockerfile diff --git a/2-sorter/Makefile b/2-sorter/Makefile new file mode 100644 index 0000000..e50caa2 --- /dev/null +++ b/2-sorter/Makefile @@ -0,0 +1,22 @@ +.PHONY: all +all: go js php py + +.PHONY: go +go: + @echo "go" + docker run --rm -it `docker build -q -f go.Dockerfile .` + +.PHONY: js +js: + @echo "js" + docker run --rm -it `docker build -q -f js.Dockerfile .` + +.PHONY: php +php: + @echo "php" + docker run --rm -it `docker build -q -f php.Dockerfile .` + +.PHONY: py +py: + @echo "py" + docker run --rm -it `docker build -q -f py.Dockerfile .` diff --git a/2-sorter/README.md b/2-sorter/README.md new file mode 100644 index 0000000..516779c --- /dev/null +++ b/2-sorter/README.md @@ -0,0 +1,21 @@ +# Day 2 - Sort & Merge + +> There are multiple elves that help Santa to keep track of all of the people on +> his list. Every person on the list has a unique number assigned to help +> identify him or her, but in order to work efficiently, the elves work in three +> groups. This causes people to be listed across the separate and exclusive +> lists. +> +> i.e. If Prof. Lawrence J. Hubert is assigned number 9780824776176 on list A, +> no other person will be assigned his number and he will not be on list B or +> list C. + +Santa likes to review the list in numerical order, but the elves build each list +by randomly assigning the next person or any list. + +Write a function that helps Jingles merge the three numerically sorted lists +into a new sorted list for Santa to review. + +Example: [1,4,9],[3,5,8],[2,6,7] → [1,2,3,4,5,6,7,8,9] + +Bonus: Can you sort into a new list without starting with an empty list? diff --git a/2-sorter/go.Dockerfile b/2-sorter/go.Dockerfile new file mode 100644 index 0000000..7d41591 --- /dev/null +++ b/2-sorter/go.Dockerfile @@ -0,0 +1,3 @@ +FROM golang:1-alpine +COPY sorter.go . +CMD [ "go", "run", "sorter.go" ] diff --git a/2-sorter/js.Dockerfile b/2-sorter/js.Dockerfile new file mode 100644 index 0000000..2b1b2ce --- /dev/null +++ b/2-sorter/js.Dockerfile @@ -0,0 +1,3 @@ +FROM node:lts-alpine +COPY sorter.js . +CMD [ "node", "sorter.js" ] diff --git a/2-sorter/php.Dockerfile b/2-sorter/php.Dockerfile new file mode 100644 index 0000000..7ad8351 --- /dev/null +++ b/2-sorter/php.Dockerfile @@ -0,0 +1,3 @@ +FROM php:7-cli-alpine +COPY sorter.php . +CMD [ "php", "sorter.php" ] diff --git a/2-sorter/py.Dockerfile b/2-sorter/py.Dockerfile new file mode 100644 index 0000000..7710113 --- /dev/null +++ b/2-sorter/py.Dockerfile @@ -0,0 +1,3 @@ +FROM python:3-alpine +COPY sorter.py . +CMD [ "python", "sorter.py" ]