mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-12-11 00:21:24 +01:00
feat(challenges): add consecutive-numbers
This commit is contained in:
29
challenges/consecutive-numbers/README.md
Normal file
29
challenges/consecutive-numbers/README.md
Normal file
@@ -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.
|
||||
Reference in New Issue
Block a user