Skip to main content
8 events
when toggle format what by license comment
Aug 23, 2017 at 13:38 comment added Icepickle @Vogel612 I added the remark that the original was not that performant, and added an es6 class to maintain some difference from other answers ;)
Aug 23, 2017 at 13:38 history edited Icepickle CC BY-SA 3.0
added 2153 characters in body
Aug 23, 2017 at 11:43 comment added Icepickle @Vogel612 That's true, however, I didn't say it was more performant :) The OP just requested less code to write. After I saw the response from coderodde, I also saw that his implementation was lots better
Aug 23, 2017 at 11:27 comment added Vogel612 this requires \$O(n)\$ additional space, which is utterly unnecessary
Aug 22, 2017 at 15:02 comment added Icepickle @konijn You are perfectly right :) I made simple' functions of them :)
Aug 22, 2017 at 15:02 history edited Icepickle CC BY-SA 3.0
deleted 9 characters in body
Aug 22, 2017 at 13:15 comment added konijn +1 in general, though to use const and unnamed functions where function is plain better ( to resolve stack traces) is bad form IMO.
Aug 22, 2017 at 9:51 history answered Icepickle CC BY-SA 3.0