@ColbyDauph is correct about the purpose of the Kata. It is intended to make new Rubyists aware of existing features, which means that this solution is "really solving it". However, I'm not a big fan of Kata being used this way and would much rather have problems which challenged the user to create his or her own solution.
bruhhhhhhhh
Yeah, you're right. I didn't see that there are two different variables xsum and ysum
add 1 for north sub 1 for south. add 2 for east, subtract 2 for west. ;).
if you go to the north 5 times and then to the west 5 times in this case you will get true
Gives the result wanted? It's solved.
C1 -> 25:1 , 50:0
C2 -> 25:2 , 50:0
C3 -> 25:3 , 50:0
C4 -> 25:4 , 50:0
C5 -> 25:3 , 50:1
C6 -> 25:2 , 50:0
C7 -> 25:1 , 50:1
So you could still have another costumer paying with 100 and would be ok.
Please make it return a boolean, why return YES or NO strings?
Just for showing LINQ usage.
Why not just
foreach (...) { }
instead ofToCharArray().ToList().ForEach(...)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Which language?
This comment is hidden because it contains spoiler information about the solution
@ColbyDauph is correct about the purpose of the Kata. It is intended to make new Rubyists aware of existing features, which means that this solution is "really solving it". However, I'm not a big fan of Kata being used this way and would much rather have problems which challenged the user to create his or her own solution.
Loading more items...