exercism/go/series
Brian Buller 50f4a86fd8 Initial Commit 2016-08-13 18:20:14 -05:00
..
main Initial Commit 2016-08-13 18:20:14 -05:00
README.md Initial Commit 2016-08-13 18:20:14 -05:00
asktoomuch_test.go Initial Commit 2016-08-13 18:20:14 -05:00
first_test.go Initial Commit 2016-08-13 18:20:14 -05:00
series_test.go Initial Commit 2016-08-13 18:20:14 -05:00
slice.go Initial Commit 2016-08-13 18:20:14 -05:00

README.md

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.

Source

A subset of the Problem 8 at Project Euler view source