This was my initial solution but failed on conversion of 0 to -0. suspect the author has since changed the test.
very creative way of thinking!
Wait what? how?
eval() is a dangerous function, which executes the code it's passed with the privileges of the caller.
a newbie here and yeah sure, will maintain it next time!
Please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
Damn thats clever, mine is more or less the same but I didn't think to use the test method which could've shrunk my code down into a single line like yours, nice :)
thank you for the readable solution
Very clever but maybe a bit superfluous to use a higher order function in a challenge that wants you to recreate the functionality of another higher order function lol!
You missed the request.
Palindrome substring length range is 2-7.
"arozazora" is not working with this match
This is the solution I used however eval shouldnt be used for real world code use cases. It has serious security flaws and inputs would need to be verified before using eval and even then it is not ideal as not all cases can be covered.
Well, if the list has length == 2? maxDiff(0,1)
fastest algorithm tested so far!
also simple to read...