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.
you gotta be joking
Thanks for teaching me about this function!
I raised an issue.
Getting odds and evens swapped? Your list has 2,3,4,5,6 appearing odd number of times, the kata states there will be exactly one that appears an odd number of times. And yes, this trick only works if the input follows the rule.
I've tested this solution out, and if we give a list like
[1, 1, 2, 3, 4, 5, 6]
, I get back 6. If I give it the list[1, 1, 2, 3, 4, 5]
, I get back 0.This comment is hidden because it contains spoiler information about the solution
Never knew
~
, thanks broref: Layz pattern match
refering to Wiki- Regular_paperfolding_sequence
Weird test cases after submitting
Code in Haskell
Problem
According to the code I've submitted,
[]
should be returned instead of[1,2,3,4]
[2125,1955,173400,24]
is way more thann=24
You: No, you can't use it.
Me: Yes, I can.
LOL
This comment is hidden because it contains spoiler information about the solution