DoControl interview question

Explain what certain javascript vectorial functions filter and find, explain what the code does and if it could be implemented more efficiently.

Interview Answer

Anonymous

5 May 2023

Since find was find in the body of the filter callback, it means running on O(N^2 ) while it could be NLog(N) if they used a dictionary as data structure, instead of arrays.