Find All Numbers Disappeared in an Array | Leetcode 448 | Live coding session | 2 Approaches

preview_player
Показать описание
Here is the solution to "Find All Numbers Disappeared in an Array " leetcode question. Hope you have a great time going through it.

1) 0:00 Explaining the problem out loud
2) 1:50 Algorithm walkthrough
3) 5:00 Coding

For discussion/feedback

PS : Please increase the speed to 1.25X
Рекомендации по теме
Комментарии
Автор

Your videos help me a lot. It also teaches how to approach a problem.

MohitRaj-
Автор

Got the problem logic . it's very easy question

praveenj
Автор

One more way to solve in O(n) time and O(1) space.
We can try to sort the array in O(n) time as the elements will be in [1, n], at each i th index i+1
Will be their if sorted.

So after trying to sort that,
Iterate one more time and where ever the i th index != i+1
Add i+1 to answer

sreejith
Автор

Could you please the intuition behind the algo ?

kritikadhuria
Автор

Is video ke thumbnail ke shoes bta rhe hai ki hum chlte chlte kitna aage aa gye hai

amitbajpai
Автор

hey in c++ isnt it sufficient to just iterate from 1 to n and check if the value lower bound of the element in the nums array is equal to the element itself, if its not we just add this element to the ans.we also would add a element if the lower bound points to end of array..
could you tell if this is correct and efficient(ps: i am new to software engineering and coding)

shashwatmishra
welcome to shbcf.ru