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've merged the fork. Thank you!:)
thank you! I encountered same issue (random test in python not passing). printed out all complex number string and the conversion - all correct.
I'll close this issue as soon as the fork will be published. :)
Added the fixed test that you quoted to catch the edge case my code was failing
the thing is, depending on the algo you use, there might be some edge cases to some algo that are not to others. The solution I did seems to be of a different kind than yours/the author's one. The first version I did would have fail the cases I talked about. But it passed all the fixed tests anyway.
I'm not sure I understand the second issue - there are 25 fixed tests in the suite which cover several edge cases (not mine, taken from the js version)
More likely that you do not have enough honor points yet. :/
Well, we'll wait for the author, then. ;)
BTW: did you address the issue above too?
Apparently no. Probably because I'm the translator, not the sensei.
couldn't you directly edit the kata? ("edit kata" button near the top right corner of this page)
Mea culpa, slipped by me. Published a (hopefully) bug-free version of the translation.
issue confirmed:
I'm having the same issue.
For example below: If you add Real values by hand, you will have 5691. Expected real part in testcase is wrong. Imag is ok.
log:
['521+229i', '-269', '906+942i', '-237', '939', '141', '580i', '653', '9', '720+465i', '697-886i', '737-61i', '761+583i', '767i', '177+718i', '-198-560i', '753-737i', '729i', '-698i', '970i', '972i', '360i', '174', '-508+392i', '-24', '-990-370i', '986-49i', '949i', '-257', '964i']
'5691+6259i' should equal '6248+6259i'
Random test cases are added.
I don't think this solution is very readable.
At first we get 3
if
s, but we don't know what are we actually comparing,rand
is assigned later.I also don't see at a first glance what is the condition of repeating the loop and how probable is that.
Since the third digit doesn't influence the result, generating and comparing it seems pointless; it is a noise, which decreases readability.
I could also comment the style, but I actually don't have problems with that (maybe except the indentation), although people generally prefer using spaces between operators.
It was a challenge... not for my programming skill but.. I spent in deep thought 2 days. When the solution was found I was happy as a child. There were no thoughts about refactoring.
Loading more items...