diff --git a/challenges/consecutive-numbers/README.md b/challenges/consecutive-numbers/README.md new file mode 100644 index 0000000..feec4fb --- /dev/null +++ b/challenges/consecutive-numbers/README.md @@ -0,0 +1,29 @@ +# consecutive-numbers + +Created by [@Divlo](https://github.com/Divlo) on 28 June 2021. + +## Instructions + +Write a function which takes a list of integers, and which returns the (possibly empty) list of pairs of successive consecutive integers that there may be in the list. + +### Input + +```txt +7 +1 +2 +5 +3 +4 +``` + +### Output + +```txt +1, 2 +3, 4 +``` + +## Examples + +See the `test` folder for examples of input/output. diff --git a/challenges/consecutive-numbers/solutions/.gitkeep b/challenges/consecutive-numbers/solutions/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/challenges/consecutive-numbers/test/1/input.txt b/challenges/consecutive-numbers/test/1/input.txt new file mode 100644 index 0000000..8261527 --- /dev/null +++ b/challenges/consecutive-numbers/test/1/input.txt @@ -0,0 +1,6 @@ +7 +1 +2 +5 +3 +4 \ No newline at end of file diff --git a/challenges/consecutive-numbers/test/1/output.txt b/challenges/consecutive-numbers/test/1/output.txt new file mode 100644 index 0000000..dc56a27 --- /dev/null +++ b/challenges/consecutive-numbers/test/1/output.txt @@ -0,0 +1,2 @@ +1 ; 2 +3 ; 4 \ No newline at end of file diff --git a/challenges/consecutive-numbers/test/2/input.txt b/challenges/consecutive-numbers/test/2/input.txt new file mode 100644 index 0000000..e69de29 diff --git a/challenges/consecutive-numbers/test/2/output.txt b/challenges/consecutive-numbers/test/2/output.txt new file mode 100644 index 0000000..e69de29 diff --git a/challenges/consecutive-numbers/test/3/input.txt b/challenges/consecutive-numbers/test/3/input.txt new file mode 100644 index 0000000..dfa147a --- /dev/null +++ b/challenges/consecutive-numbers/test/3/input.txt @@ -0,0 +1,4 @@ +1 +4 +3 +5 \ No newline at end of file diff --git a/challenges/consecutive-numbers/test/3/output.txt b/challenges/consecutive-numbers/test/3/output.txt new file mode 100644 index 0000000..e69de29 diff --git a/challenges/consecutive-numbers/test/4/input.txt b/challenges/consecutive-numbers/test/4/input.txt new file mode 100644 index 0000000..eb6b3c1 --- /dev/null +++ b/challenges/consecutive-numbers/test/4/input.txt @@ -0,0 +1,4 @@ +1 +4 +5 +3 \ No newline at end of file diff --git a/challenges/consecutive-numbers/test/4/output.txt b/challenges/consecutive-numbers/test/4/output.txt new file mode 100644 index 0000000..56335ba --- /dev/null +++ b/challenges/consecutive-numbers/test/4/output.txt @@ -0,0 +1 @@ +4 ; 5 \ No newline at end of file diff --git a/challenges/consecutive-numbers/test/5/input.txt b/challenges/consecutive-numbers/test/5/input.txt new file mode 100644 index 0000000..0e9ff98 --- /dev/null +++ b/challenges/consecutive-numbers/test/5/input.txt @@ -0,0 +1,8 @@ +5 +1 +2 +3 +8 +-5 +-4 +7 \ No newline at end of file diff --git a/challenges/consecutive-numbers/test/5/output.txt b/challenges/consecutive-numbers/test/5/output.txt new file mode 100644 index 0000000..57b4b8e --- /dev/null +++ b/challenges/consecutive-numbers/test/5/output.txt @@ -0,0 +1,3 @@ +1 ; 2 +2 ; 3 +-5 ; -4 \ No newline at end of file