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.
- Prepare
- Algorithms
- Search
- Missing Numbers
- Discussions
Missing Numbers
Missing Numbers
Sort by
recency
|
1244 Discussions
|
Please Login in order to post a comment
Hash map and reallocate array
Here is my c++ solution, you can watch the explanation here : https://youtu.be/6AXUA5_XwUw
RUST:
Here is my Python solution!
I think, you can just do the difference between the Counter objects. def missingNumbers(arr, brr): arr = Counter(arr) brr = Counter(brr) missing = brr - arr return sorted(list(missing))
I'm not very familiar with Counter objects so I didn't know this existed.
Dont judge me i am just starting