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.
this is what happens when you don't write more test cases
I dunno. seemed like a good recursion problem
this is a nice reminder for me for the third argument in map that I always forget to exploit
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
yeah you can tell I'm new to scala. was having issues with fold, being, the args passed into the fold were always of type Any. Didn't realize using a foldLeft/foldRight would give me explicit types without having to check - really shortens it up
See above:
"Look at the numbers. Does any number contain 3 or 7?
And consider this sentence from the description: "The values of the digits 3 and 7 are twisted."
Not only numbers but the value of the digits!"
any update?
This comment is hidden because it contains spoiler information about the solution
nice, almost identical to mine. I thought I'd see more streams on this solution, but I guess it lends itself really simply to imperative style
Ugh thanks, I knew there would be something hilariously obvious I missed :D
Look at the numbers. Does any number contain 3 or 7?
And consider this sentence from the description: "The values of the digits 3 and 7 are twisted."
Not only numbers but the value of the digits!
This comment is hidden because it contains spoiler information about the solution
wait, why is [12,13,14] intended to swap to [12,14,13] ? There is nothing in the requirement suggesting that multiples of 3 and 7 should be swapped - for instance, 6 and 9 aren't intended to be swapped.
the input array on the last test (one of them at least, where it's failing) contains three odds and ten evens - so there is no way to solve it, the test needs to get fixed. [2 ,6 ,8 ,10 ,3 ,2 ,6 ,8 ,200 ,700 ,1 ,17 ,6] I got the integers by stream-peeking