Find the disappearing numbers (LeetCode 448) | Full solution with examples | Study Algorithms

An integer array of size 'n' contains elements in the range of [ 1, n ] There may or may not be repeating numbers. You need to find the numbers that are disappeared from this range. In this video we explore the most straight forward way to approach this problem and then try to optimize it eventually. The video discusses an in-place solution that is both time and space efficient. All of this along with beautiful animations and visuals. The dry-run of code is also provided in JAVA.
Chapters:
00:00 - Intro
01:13 - Problem statement and description
03:13 - Brute Force Method
05:05 - Space and Time Efficient Solution
09:50 - Dry-run of Code
12:11 - Final Thoughts
📚 Links to topics I talk about in the video:
Array Data Structure: • Array Data Structure e...
Brute Force Solutions: • Brute Force algorithms...
What is Big O?: • Big O Notation Simplif...
Time Complexity of an algorithm: • What is the Time Compl...
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: github.com/nikoo28/java-solut...
Test-cases on Github: github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: amzn.to/36pU0JO
Favorite book to understand algorithms: amzn.to/39w3YLS
Favorite book for data structures: amzn.to/3oAVBTk
Get started for interview preparation: amzn.to/39ysbkJ
🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: amzn.to/3pAqh8O
Microphone: amzn.to/2MCX7qU
Recording Camera: amzn.to/3alg9Ky
Tablet to sketch and draw: amzn.to/3pM6Bi4
Surface Pen: amzn.to/3pv6tTs
Laptop to edit videos: amzn.to/2LYpMqn
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: studyalgorithms.com/feed/
Join fan mail: eepurl.com/g9Dadv
#leetcode #programming #interview

Пікірлер: 23

  • @mindmatters851
    @mindmatters851 Жыл бұрын

    your explanation is too good every one can understand . thanks bro

  • @manishjeena6325
    @manishjeena6325 Жыл бұрын

    Wow, Amazing Explanation 🥰🙏Thank You❤

  • @CostaKazistov
    @CostaKazistov2 жыл бұрын

    That's pretty clever. Really interesting solution.👍

  • @l1z1ng3r
    @l1z1ng3r7 ай бұрын

    thank for the video) 💘

  • @priyankarai7917
    @priyankarai7917 Жыл бұрын

    great explanation👍👍

  • @RavinderSingh-nh6th
    @RavinderSingh-nh6th11 ай бұрын

    Thank you so much

  • @pranav8609
    @pranav8609 Жыл бұрын

    you are underated

  • @nerd6134
    @nerd61342 жыл бұрын

    Fire 🔥 bro

  • @TraderOff-Road
    @TraderOff-Road26 күн бұрын

    thaaanks

  • @nikhilbatchu7910
    @nikhilbatchu79102 жыл бұрын

    Tried this using the count sort. I have created a temp array and stored the frequencies.Is my approach can be considered as optimal?

  • @nikoo2805

    @nikoo2805

    2 жыл бұрын

    Yep…this solution will also be optimal

  • @subee128
    @subee1286 ай бұрын

    Thanks

  • @Englishwithhimanshu8581
    @Englishwithhimanshu85819 ай бұрын

    Good bhaiya

  • @shubhambelwal674
    @shubhambelwal6742 ай бұрын

    you have made this approach ?? by the way ,i liked this approach

  • @vigneshr4197
    @vigneshr4197 Жыл бұрын

    No need to create new array while multiplying with -1?

  • @ashrafel-gaaly8657

    @ashrafel-gaaly8657

    9 ай бұрын

    I think you do if some elements in the array are negative. In these examples they are all positive and yes you can update the existing array

  • @mdanik1361
    @mdanik13612 жыл бұрын

    I couldn’t understand the brute force method and efficient method time complexity difference... In brute force meth, iterating through every elements doesn’t take O(n) too? :)

  • @nikoo2805

    @nikoo2805

    2 жыл бұрын

    In Brute Force method you are iterating over the array again and again to find the element. So you are doing n iterations for n items. Hence, a time complexity of O(n^2) In the efficient method, you only iterate once Hope that helps :)

  • @mdanik1361

    @mdanik1361

    2 жыл бұрын

    @@nikoo2805 thank u...can u share the brute force code please?

  • @RohanSingh-my3nl
    @RohanSingh-my3nl3 ай бұрын

    Making Video is So long for no reason Thuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

  • @nikoo28

    @nikoo28

    2 ай бұрын

    Everyone has a different learning pace my friend. For quick learners there are always timestamps and chapters you can skip to :)

Келесі