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.
I was trying a solution that would calculate the ratio the cut-off point as following:
sqrt(shortestDot * longestDash)
, where dashes have to be strictly higher. I considered it a good idea as it allows both dot and dash the same ratio of error.But my simple heuristic with dividing the longest dash by two worked a lot better for the most part, and combined with a few more heuristics, I covered it all but the weird case where
"1001"
is supposed to mean". ."
, quite inconsistently with the4 kyu
Kata. So I kinda gave up on trying a more interesting solution and I agree that this Kata could have been more interesting if the test cases weren't so strict in some rather ambiguous or straight out controversial cases.approved by author
Done.
Could you approve this fork of COBOL translation, with some improvements in tests? You approved an old version (I'm use to doing a new fork when performing some change, so it can be more easily checked): https://www.codewars.com/kumite/61ac7f4e3f4ec100574f1bd3?sel=61afbe8e46519d00079a4760
Nice kata! Might seem like difficult math but a lot of the math is actually given in kata description so all that is needed is profficiency and confidence in reasonably basic (for 2kyu level) mathematics. The math involved (that you are essentially given) is relevant to several important fields including encryption.
Very strange implementation.... it even "deletes" attribute that never existed either at instance or at class level.
It's related to caching, it's not a kata issue.
Your points should be updated now.
This comment is hidden because it contains spoiler information about the solution
Unfortunately it appears that your k-means solution is not available for me to view - probaly because it was not in Python and I solved in Pyhton as would be interesting. Looking at top solutions that I can see I can say that they involve tweakery to the test cases (they are deceptively short as there is surely a lot of analysis of the uderlying test cases behind them) and the statement at the top of the kata "transmission is generally accurate according to the standard, but some dots and dashes and pauses are a bit shorter or a bit longer than the others." is very missleading given the extremely unnatural distributions involved.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It is nowhere close to being a solution to the 50x50 version. It took 3 days and nights to get from this to passing the multisize version. This code will not only run 5 times too slow for the multisize version it will actually fail to produce answers for about 10% of the cases in the multisize version. After three days and almost giving up I passed hard version only by trying many times and that is after some extreme optimisation and endless time in cPrifile and line_profiler. The sort of things I had to take into account is like:
a = 0 or 1 depending on some condition
var = a in numpyarray.tolist()
runs much slower than:
a = 0 or 1 depending on some condition
if a =0:
var = 0 in numpyarray.tolist()
if a = 1:
var = 1 in numpyarray.tolist()
Not only I had to introduce lots of new functionaluty to pass multisize version I had to introduce lots of hyperparameters that had to be fine tuned to pass. And even Python version makes difference as 3.8 is just a bit slower so had to chnage to 3.6 as no way my code (after three days of working from the above state) would pass on 3.8.
I did sole level 1 katas in just 0.5 days (4 hours), most a bit longer but not longer than a day or two (day being 8 hours). The multisize version of this .... even from this code the journy is harder than solving about 4 other level1 katas....
Next time, don't just drop the solution to the hard version in ths easy version of the kata, thx. There are already enough sources out there for plagiarists, no need to add more.
Loading more items...