Find the Difference of Two Arrays - Leetcode 2215

preview_player
Показать описание
Today we will solve the "Find the Difference of Two Arrays" problem from Leetcode. We will walk through brute force and then use Sets to solve this problem.

This question has been asked by Google, Amazon, Apple, Adobe and so many other companies.

Please check the channel page for more leetcode solution videos. Also don't forget to like, comment, and subscribe.
Hope you enjoy the video and Thanks for watching 🙏

Chapters:
0:00 Intro and question
0:05 Examples
0:31 Broute-force solution
0:39 Using Sets
1:30 Set Solution Code Walkthrough
2:14 Optimization
2:42 Optimized solution Code Walkthrough
3:15 Time and Space Complexity
Рекомендации по теме
Комментарии
Автор

optimized solution will still got time complexity of O(n+m)
bc putting arrays into two sets takes O(n+m) time.

youarefat
Автор

I didn't understood a single thing, but my soul became little stronger

sameersaini