exercism/go/series/README.md

32 lines
776 B
Markdown
Raw Normal View History

2016-08-13 23:20:14 +00:00
# Series
Write a program that will take a string of digits and give you all the possible consecutive number series of length `n` in that string.
For example, the string "01234" has the following 3-digit series:
- 012
- 123
- 234
And the following 4-digit series:
- 0123
- 1234
And if you ask for a 6-digit series from a 5-digit string, you deserve
whatever you get.
To run the tests simply run the command `go test` in the exercise directory.
If the test suite contains benchmarks, you can run these with the `-bench`
flag:
go test -bench .
For more detailed info about the Go track see the [help
page](http://help.exercism.io/getting-started-with-go.html).
## Source
A subset of the Problem 8 at Project Euler [view source](http://projecteuler.net/problem=8)