0 <= input.length <= 100
Strings of lengths 0 and 100 should be tested.
0
100
input may contain any valid ASCII characters
This should be tested too. Random tests should be added. The function name should be valid-parentheses or maybe even valid-parentheses?.
valid-parentheses
valid-parentheses?
I just wanted to add a simple fork that shows off what the Project Euler question was hinting towards. The iterative solution becomes slow beyond a million or so.
Thanks :).
I like the zipWith tail trick, I'll have to remember that for code golf.
Good catch, fixed.
Needs clojure examples added to description.
head a :: Int. Not a :: Int.
head a :: Int
a :: Int
Cool, thanks. Works for me now!
Added.
Fixed again, made a slight typo.
Still seems to be doing it in Ruby:
Test number 6: Test Passed: Value == 33 Test Passed: Value == [] Expected: [33], instead got: [] Test Passed: Value == 33
So the test expects init([33]) == [33]. Is that correct?
init([33]) == [33]
Yeah, I just noticed that my changes weren't saved, and I've updated them again.
No, the issue still occurs for JS:
// input: [ 12, 31, 38, 24 ] Expected: [12,31], instead got: [12,31,38]
Rectified.
No, I do specify differently; the test cases were wrong, as indicated by the issues below.
Loading collection data...
Strings of lengths
0
and100
should be tested.This should be tested too.
Random tests should be added.
The function name should be
valid-parentheses
or maybe evenvalid-parentheses?
.I just wanted to add a simple fork that shows off what the Project Euler question was hinting towards. The iterative solution becomes slow beyond a million or so.
Thanks :).
I like the zipWith tail trick, I'll have to remember that for code golf.
Good catch, fixed.
Needs clojure examples added to description.
head a :: Int
. Nota :: Int
.Cool, thanks. Works for me now!
Added.
Fixed again, made a slight typo.
Still seems to be doing it in Ruby:
So the test expects
init([33]) == [33]
. Is that correct?Yeah, I just noticed that my changes weren't saved, and I've updated them again.
No, the issue still occurs for JS:
Rectified.
No, I do specify differently; the test cases were wrong, as indicated by the issues below.
Loading more items...