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.
now i feel stupid, good one
best one
That's clever...
Oh, yeah. thx
Great job!
Just FYI,
could be replaced with
No random tests
The squareroot should be save into a variable, instead of being calculated twice.
Test cases assume a certain ordering of Set(HashSet) objects, which should not be done, either replace with SortedSet(TreeSet) or remove entirely.
Using a stack that explodes each list as it is encounters is a great solution.
I also like the use of "instanceof Collection" here instead of checking if it's a List or Set.
Duplicate:
https://www.codewars.com/kata/flatten
https://www.codewars.com/kata/flattening-lists
FYI - typo in tags
algoritms
Fun Kata. Thanks!
Hi, thanks for your response and fixing the testcase;-)!
Hi, seems like i made an error in one of my Testcases. It should be fixed now though, you can try again if you like. Sorry for the inconvenience.
Hi, are your (submit) testcases correct? See no problem with my code, tested deeper lists too without errors (null and empty lists too), but submit directly throws error (first case, long list):
A testoutput like 'System.out.println("Test"); return "emptyList"' (without other code) directly throws same error without output of "Test"...
Loading more items...