Ad
  • Custom User Avatar

    I've merged the fork. Thank you!:)

  • Custom User Avatar

    thank you! I encountered same issue (random test in python not passing). printed out all complex number string and the conversion - all correct.

  • Custom User Avatar

    I'll close this issue as soon as the fork will be published. :)

  • Custom User Avatar

    Added the fixed test that you quoted to catch the edge case my code was failing

  • Custom User Avatar

    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.

  • Custom User Avatar

    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)

  • Custom User Avatar

    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?

  • Custom User Avatar

    Apparently no. Probably because I'm the translator, not the sensei.

  • Custom User Avatar

    couldn't you directly edit the kata? ("edit kata" button near the top right corner of this page)

  • Custom User Avatar

    Mea culpa, slipped by me. Published a (hopefully) bug-free version of the translation.

  • Custom User Avatar

    issue confirmed:

    ['696-983i', '810+193i', '917-285i', '-442', '-997+849i', '877', '-543i', '-655i', '604i', '-310', '832', '-153', '648+651i', '629-852i', '897', '-638i', '-71-956i', '557', '270-447i', '415', '-713i', '159i', '-311+374i', '-231', '-736-67i', '680', '-446-455i', '244i', '702i', '-689']
    '3842-2818i' should equal '3758-2818i'
    
  • Custom User Avatar

    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'

  • Custom User Avatar

    Random test cases are added.

  • Custom User Avatar

    I don't think this solution is very readable.

    At first we get 3 ifs, 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.

  • Custom User Avatar

    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...