DEV Community

[Comment from a deleted post]
Collapse
 
trueneu profile image
Pavel Gurkov

What about space and time complexities?
I don't know a lot of JS internals, but judging by the fact that JS strings are immutable, 2nd and 3rd are gonna take O(n2).