Use `Set` data structure instead of `Array`
`Set` is a better data structure because it has a faster search: `Set.has` has a O(1) while `Array.includes` has a O(n).
Showing
Please register or sign in to comment
`Set` is a better data structure because it has a faster search: `Set.has` has a O(1) while `Array.includes` has a O(n).