Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It is not necessarily always possible to write a wiggle-sorted output stream.
Will we only be passed input streams that should make it possible?
Your tests is woefully inadequate. There are only sequential arrays so there is only one pattern in which we would get stuck.
Needs at least more tests and random tests.
What you're doing with those highly restrictive
reader
/writer
is pointless. There are ways to do this which are much better and yet you chose this method which provide crappy interfaces and pointless restrictions.e.g We don't even know if a reader is closed. What if one of the returned elements is
undefined
?makeStream
isn't defined when testing, only when submitting.Also, are we supposed to
close
the output stream when done, or is that only for convenience? I didn't, but it passed anyway.Last, I don't really see the usefulness of an
isWiggled
method if you can't write un-wiggled streams (it throws an error). So that function will always return true. Yes? Doesn't hurt anything, just kind of pointless.