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.
Haskell fork
Adding random tests.
Java doesn't have random tests
C# tests contain methods which look like they should be test methods, but are not annotated and never called. The methods should be either removed, or annotated with
[Test]
.This code dont handle well for Java langauge
For anyone wondering the question literally asks is a^2 a scrambled version of b?
Don't know where this multiplicity bull came from...
python new test frameworks
Im sorry, I didn't get the problem. can someone elaborate to me more clearly?
Great one but i think harder than 7kyu?
The "dictionary" and the "adjacency list" are quite similar in structure, and one of them should be taken out as a redundant test case. The kata should be testing the conversion of "edge list" instead of "adjacency list".
I am somewhat new to codewars, so maybe this feature is available and I'm just not aware of it. I like the ability to observe other peoples implementation; it's good for education in various clever approaches to problem solving, and idiocyncracies of a language. I noticed that the small and full test suite show run time. hmm... what about comparing various implementations using Benchmark to rank efficiency of a solution? So I did that using mine and 5 other solutions, then started refining mine with lessons learned from the benchmarking. Some things that work for a single method testing (altering default input array) become problems when testing multiple methods. Some techniques (smartmatching), while valid for the language, are just slower when compared to "less clever" techniques (simple for loop). Is there a good place in codewars to post my code and findings? Do other languages have something like the Perl Benchmark module for time testing, stress testing?
This comment is hidden because it contains spoiler information about the solution
My bash script works, but it is not efficient enough to finish within 12000 ms. I made my best attempt at translating my completed Python solution to bash, but unfortunately, the bash version is too slow. Any suggestions for improving efficiency in bash? I am using associative arrays to convert between letters and their decimal equivalent. Is there a better/faster way to do that in bash? Also I am using
bc
to handle most mathematical calculations.I think that there must be some issues in GO (golang) tests.
I belive I've the solution. The only doubt I've is when both arrays are empty. For the moment, I'm presume the result should be
true
in this case.My solution passes all the initial tests, all the random tests and many of the "basic tests", but one of them is failing.
I've placed logs to see where my solution was failing and it's when both arrays are empty (It was expected to be
false
). So, I changed the condition to returnfalse
in this case and the new solution still fails and still does when both array are empty, but now, it seems to be expecting the result to betrue
.I haven't seen the tests but it seems that a test case is duplicate but with different expected results...
Please, can someone confirm?
Lua translation!
Groovy: initial solution is missing import:
import java.util.function.DoubleUnaryOperator;
Loading more items...