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 one was fun & simple.
Still, the order of the characters is an issue:
Expected 236=[L, X, G, H]}
as error: 236=[G, X, H, L]}>
"
expected:<{432=[A, B, D], 53=[C], 11=[P, R, S], 236=[L, X, G, H]}> but was:<{432=[A, B, D], 53=[C], 11=[P, R, S], 236=[G, X, H, L]}>
"
OP solved it, closing
Nice Kata, thank you, but only one question: according to example tests the output should be in increasing order, but solutions with both increasing or decreasing order pass the test. Don’t you need to mention this in the description?
IMHO in C++ your map type msv could be better. If at one point you have to sort the keys with comparing the 'int' corresponding value (see the solution, 80% of them begin with that), then you would declare this comparator IN THE msv type !
Same!
Good one.. enjoyed it !
Well, I've written a really nice solution, but it outputs the letters in a different order to that expected (not mentioned in the kata description, incidentally!)
Because I'm so happy with the code I've written, I don't want to solve this kata, now. It does everything according to the description, but doesn't pass the tests which expects the letters to be ordered. Shame!
This comment is hidden because it contains spoiler information about the solution
nice kata!
Thank you, and I'm sorry.
Please read this: https://docs.codewars.com/training/troubleshooting/#post-discourse and mark your post as having spoiler content next time.
flat
requires Node 11.0.0.This comment is hidden because it contains spoiler information about the solution
signature in java:
public static Map<Integer, List<String>> removeDuplicateIds(Map<Integer, List<String>> obj)
I would except the following if we were able/expected to mutate the input:
public static void removeDuplicateIds(Map<Integer, List<String>> obj)
In general (and also in this kata), even when input arguments are copies of objects to verify against, should input arguments be immutable?
For instance, in Java, we are allowed to mutate the Map<Integer, List> we are given.
Loading more items...