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.
CoffeeScript fork fixing issue with undefined in random tests
Yes and that is because I am a numnnutt who forgot I have to make a fork that have to be approved again.
.
Thanks for the response but I am still experiencing the same problem with your "Random climbers" tests. Here are a few examples of how the leaderboardSort function is being called in your "Random climbers" tests:
leaderboardSort(["QLFc","dpGz","JHcw","JmiG","iWwH","nYYs"], ["JHcw -2","undefined +0","JHcw +5","iWwH +0","JmiG -1","QLFc -2"])
leaderboardSort(["utyVaw","myulen","bUlWIS","KOokh","huBhEP","YMXyLy","TUKhWq","KFIFVC","QoYxLO","MBZZEp","jZawUO","iXCiKI","GuGfWg","FjCOjp","bWgFTr","bLiYTm"], ["YMXyLy -8","FjCOjp +4","myulen +0","KOokh -2","jZawUO +1","utyVaw -12","utyVaw +13","undefined -16","huBhEP -13","bUlWIS +2","YMXyLy +11","bLiYTm -12","utyVaw +13","FjCOjp -2","bLiYTm -3","bLiYTm +2"])
leaderboardSort(["i","R","m","J","V","p","G","F","","Y","B"], [" +3","R -2","undefined -4","J +2","Y +10"," +6","B -9","R +0","R +5","V +6","R +3"])
Thank you, I edited my mistakes thanks to you
If you read the question carefully, it says students in graduation status, there is no question of being less than 8 semesters.
Your description should specify how to handle students that post less than 8 semesters worth of GPAs.
Your description should specify how to handle situations where the two students post a different number of GPAs.
Correct. I was 1 off on an index.
Fixed!
There appears to be a problem with the CoffeeScript translation. Many of the random tests have "undefined" names passed into the "changes" list argument. Here is an example of how the leaderboardSort function was called with one of the random tests:
leaderboardSort(["E","R","P","s","N","e"], ["undefined -1","undefined -1","N +2","E -4","E +1","N -3"])
The description of your kata is the best that I've seen on CodeWars. Awesome job!!!!!!!!!!!!!
This comment is hidden because it contains spoiler information about the solution
Fixed
its better to have separate blocks of fixed and random tests.
The test does not test this correctly; first, the invalid test only inputs a number
2345678
, which is completely outside the Unicode range, so it isn't even a valid character, and fails any checks without question. There are no checks which is a valid character but not ASCII.Secondly, random tests generate random charcodes in range
1 - 256
(randint
is inclusive in both sides), but the valid range for ASCII is0 - 127
. Yes, null character is valid too. So the random tests need to be adjusted, and null character needs to be specifically tested.(Also, what happens if emoji numbers like
069
or007
appears in the input? are they considered valid? This needs to be clarified and tested too.)Should be fixed now.
Loading more items...