LeetCode Question · Jul 2020

Facebook | OA Final | Coding | 2020 | has duplicates

1 upvote 647 views 4 replies

Question Details

check for duplicates inside a subarray of length k has_duplicates([1, 2, 3, 2, 4],3)==True has_duplicates([1, 2, 3, 4, 2],3)==False Ok to implement o(n^2) then improve to o(n)

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Arrays