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.
Hell yeah, solution like this is wrong:
check_ages?([{:age=>40, :sex=>:m}, {:age=>19, :sex=>:m}], :m, 20)
will returntrue
insteadfalse
I think so,too.
That's why I got it wrong, it needs ALL matched sex to have a superior number!
The task says returns true if all of the items matching the sex value have ages greater than the value provided.
I think the solution in question passes this.
What if all data contain only sex: 'f' and method run with sex: 'm', I think it be wrong.
Scan only works if you start doing ugly tricks, like in my current solution.
Totally agree. It fails on this test case scenario:
current: "1294567890" => "67890"
answer: "1294567890" => "94567"
I solved it, thanks, but really some thoughts here gave me a headway on solving some other problems :-)
This comment is hidden because it contains spoiler information about the solution
I also do not buy the idea that the solution requires the array to be sorted in a particular form
There is something either wrong with the test suite, or the websites test engine:
is passing this shouldn't occur, as my code is not returning an empty array
Thanks, I do understand, I guess my annoyance was a result of me thinking I have the right piece of code and some test are still failing :-) but I do also feel that there should be a way to identify which or what test are failing so we can make them pass (which of course should be after a set of criteria has been met).
@ineiti I can't find any JulianNicholis answer, same as I can't read my comments, says I need 250kyu to do so, I sincerely do feel this should be less than a game and more like an opportunity to learn, hiding the test in one way makes sense, but when I pass 6 or more test and can't find why one is passing then it defeats the purpose
Whoever hid my comment should at least show what's wrong with my code, how do I learn when I can't figure why the test is breaking
This comment is hidden because it contains spoiler information about the solution