Skip to content

Commit

Permalink
README.md for MaxSpan
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslieu authored May 17, 2019
1 parent 1127255 commit 912100a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions MaxSpan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### MaxSpan

Consider the leftmost and righmost appearances of some value in an array.
We'll say that the "span" is the number of elements between the two inclusive.
A single value has a span of 1. Returns the largest span found in the given array.

```
maxSpan([1, 2, 1, 1, 3]) → 4
maxSpan([1, 4, 2, 1, 4, 1, 4]) → 6
maxSpan([1, 4, 2, 1, 4, 4, 4]) → 6
```

0 comments on commit 912100a

Please sign in to comment.