Ad
  • Custom User Avatar

    I love it, cause it made me understand

  • Default User Avatar

    I did the same thing, but maybe it's a bit more readable :')
    I think it's one of the best ways to solve this

  • Default User Avatar

    Oh, wow, I didn't know Sets were a thing! Thank you!

  • Custom User Avatar

    As I understand this solution relies on the fact that at board will be numbers(0...9). But as I see we can generate other combination of different values that will be accepted by your solution. And what about zero?

  • Custom User Avatar

    Good challenge! I actually had this bug for a while that led me to believe that this was challenging the precision of JS's float numbers haha, my goodness. No kidding! I was getting close to implementing 'correction factors' and all this stuff until I saw that the test cases aren't as bad as I thought. Anyways, from that unnecessary tangent I learnt just how innaccurate JS can be.

  • Custom User Avatar

    This has reminded me of a big principle, thanks heaps.

  • Custom User Avatar

    Well, that's what I've been saying above: the code itself should be as concise and elegant as possible, while the intent or explanation of the code should go in the comments. Dumbifying the content of the code itself just to make less competent people able to follow, at the expense of clean and concise code, is the real wtf and unacceptable thing.

    (By the way, the explanations have been provided down the comments below.)

    But then, I'm not surprised that lots of newbies went down the path of "why you no spoonfeed me noob code". The fact that OP get something like 31 score is mind-boggling yet anticipated. It's really something that's even more basic and fundamental than "coding fundamentals"...

    p.s If anything I want to bash this OP more for his blatant and shameless "pick-a-fight-and-run" tactic. After all, you've picked a fight yourself, and then you're just going all "you misunderstood me, I do not wish to discuss any further" and try to get away with it like nothing happened? That's not going to happen, mate. There are consequences of picking up a wrong fight, and you need to face it.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Good point.But you post at the wrong place.

    This code is simple and just doing one thing.It's not unreadable.

    If you don't know what the code is doing.You should learn.

    It's faster than the normal code.If you have an cost-efficient issue,it will help you.

    For honestly,you should have learned if you are studying Computer Science(At least in our country).But we just don't know where to use it.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution