DEV Community

Discussion on: Top 30 Javascript Interview Warmup Exercises Part 3

Collapse
 
satishpatro44 profile image
satishpatro44 • Edited

This is one of the best collection of codes to refresh mind. Thanks.
I want to say some point which I think should be applied to increase performance.

1st one frequency check
Check for length of string first

5th removing duplicate
You are checking if element is there in set. Instead do set.add(c) based on tru false push it to constant

6th deep freeze.
I don't know what is deep freeze. But when I clicked on run. I got erro "RangeError: Maximum call stack size exceeded
at Function.hasOwnProperty in core — line 0
"