Question d’entretien chez DoControl

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

Réponse à la question d'entretien

Utilisateur anonyme

5 mai 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.