We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hey folks,
Here is the optimized solution in javascript, that will runs in O(n) optimization.
Inside the for-loop, if any match found then I added one key word called continue which means, the statement after the continue key word will not run for that iteration.
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
Hey folks, Here is the optimized solution in javascript, that will runs in O(n) optimization.
Inside the
for-loop
, if any match found then I added one key word calledcontinue
which means, the statement after thecontinue
key word will not run for that iteration.