The method breaks if
a = 5068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919
b = 3430838343343083834334308383433430838343343083834334308383433430838343343083834334308383433430838343343083834334308383433430838343343083834334308383433430838343v34308383433430838343343083836
Wow, nice and elegant aproach, but you should use '===' instead of '==' to compare left and right as we intend to compare their numerical value so including type aswell ( in your case "false" would be equal to "0" etc ), and I personally am not a fan of using vars ( "let" and "const" would be more elegant )
The method breaks if
a = 5068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919506826491950682649195068264919
b = 3430838343343083834334308383433430838343343083834334308383433430838343343083834334308383433430838343343083834334308383433430838343343083834334308383433430838343v34308383433430838343343083836
Awesome
I be so excited to complete a challenge with my 32 lines of code then come here and see this TT_TT
Really clever, thank you for the insight.
Genius!
very nice!
I did not understand at first so had to go step by step on paper.
first top voted solution that is really cool in a while
Wow, nice and elegant aproach, but you should use '===' instead of '==' to compare left and right as we intend to compare their numerical value so including type aswell ( in your case "false" would be equal to "0" etc ), and I personally am not a fan of using vars ( "let" and "const" would be more elegant )
Linq is just using someone else code.
And here I am, slicing up the array like a madman with a rusty cleaver...
But there is an index that will make it work. It's 0.
On index
0
left and right values are equal.So smart!
It should be noted that in the detail, m > 2.
fun kata and still reasonable best practice.
yeah nice, but it's missing the case in which both a and b are negative
Loading more items...