5 kyu
Poker cards encoder/decoder
867 of 1,693thisFeeling
Loading description...
Strings
Games
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
i just realized how to do it in 1 line, so i did it in 1 line :D
Great kata, but my previous one was https://www.codewars.com/kata/5ac616ccbc72620a6a000096 (5kyu) And they are really incompareable in terms of complexity...
I think this kata should be 6 kyu maximum
C# Translation, as with other translations, no input validation required.
Approved
Python translation. Please, review and approve (the author is inactive).
I didn't add input validation because it'd be a waste of time for everybody.
approved
Test.assertDeepEquals
should be used, or better Node 10 + chaifixed
The description formatting is broken.
.
Great Kata - enjoyed this one.
CoffeeScript translation kumited! Please Accept :d
No random tests. Input validation required. Functionality overload.
Ungood.
i've tried to fix the kata, using
Node 10
andchai
, adding random tests, spliting the functionality between two functionsencode
anddecode
and discarding invalid inputs. older solutions should still be valid because i wrote a piece of code to alias the old function nameplease file a new issue if something is wrong
Should break encode and decode up into two functions or even a class. Does not make sense to have the same function encode and decode without an options argument.
done
Please add addidtional test case Test.expect(cardsConverter('abc')===null , 'input is not an array');
There should be tests for mixed arrays e.g. [15, '5d', 'Ac']. What would the result be? null or [0, '3d', 17]?