For TS
Description states: The strings will always be "well formed", meaning with a space on each side of the operators.
Logging the input of random tests determines that this was a cruel lie...
example : 8512366752971078000008@6@31@30@29@12@36@8@30@25@32@35@6@22@9@30
Hi, your kata was automatically retired due to low satisfaction rating. If you're interested in authoring kata, you should follow the guidelines for doing so.
defintiely not pure if it performs a mutation to the parameter, pure functions don't have side effects
.toSorted could be used in modern js
This comment is hidden because it contains spoiler information about the solution
how does this even "compile"? find returns T | undefined not T
fixed
Map would be better instead of list for .find
TS:
approximate equality should be used, or BigInts instead
For TS
Description states:
The strings will always be "well formed", meaning with a space on each side of the operators.
Logging the input of random tests determines that this was a cruel lie...
example :
8512366752971078000008@6@31@30@29@12@36@8@30@25@32@35@6@22@9@30
Hi, your kata was automatically retired due to low satisfaction rating. If you're interested in authoring kata, you should follow the guidelines for doing so.
Great solution! Many other solutions seem to return
-0
but not this one.