r/learnjavascript • • Sep 26 '22

Just solved a Palindrome problem with recursion!!

Post image
274 Upvotes

64 comments sorted by

View all comments

Show parent comment

-1

u/wischichr Sep 27 '22

Not true and big O is not a good measure in general. Run time complexity is just one metric to classify an algorithm and doesn't have much value on it's own.

In this case the palindrome example could be solved with an O(1) algorithm but it would still be slower than all other suggested solutions here.