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.
Tests do not necessarily test for "-1" being the coefficient of the term with the highest power of the variable (e.g. the x^3 coefficient of (-x+1)^3 is -1). In this case, my original code would have returned -1x^3 + ..., yet it passed because this case was not tested (I ran it again because I removed some
print()
statements, and then it failed).Brilliant kata, though—thanks!
Rust sample tests expect the function to be named
expand_binomial
, but the initial code and the full set of tests expectexpand
.Since Python 3.9, typing aliases like
Tuple
,List
, orSet
are deprecated because the type themselves (tuple
,list
,set
...) now directly support the[]
operator. The type hints in the initial code should be rewritten in consequence(Python) Apparently the test for specification "If the coefficient of a term is zero, the term should not be included" is not being performed. My first solution did not handle these cases and I passed every test.
Ouput for
expand("(r+0)^203")
given by my first solution:Go translation
D translation
Normally this would be a suggestion, but in this case I think it warrants an issue:
I had the hardest time understanding what "connected by the given value" means, until someone explained to me it means "adjacent". The fact that it is already stated that the coordinates shall contain the given value led me to believe that "connected ... by the given value" meant some special definition of "connected". It doesn't, it's just a redundant expression.
Can the description please be modified to state something like:
Also, though not related: this is pretty much just a duplicate of any of multitude of path finding kata.
COBOL translation (author is inactive).
This comment is hidden because it contains spoiler information about the solution
Good kata!
Still, I'd prefer to see example with -x and big numbers in initial unit tests.
For example:
CoffeeScript translation kumited
please scrutinize for approval.
Natural numbers normally don't include 0...
You should add random test cases. In its current state, it can be hardcoded: https://www.codewars.com/kata/reviews/5404b3f39f21e1b6f500012d/groups/5e51f1c077d51a000155e69c
This comment is hidden because it contains spoiler information about the solution
Duplicate
this is older, so technically this should be approved
however new versions are already approved and have more translations
There needs to be some kind of policy for cleanup in these cases.
Loading more items...