MENU

Fun & Interesting

Missing Number (LeetCode 268) | Full solution with visuals and diagrams | Study Algorithms

Nikhil Lohia 23,299 lượt xem 2 years ago
Video Not Working? Fix It Now

Using some basic mathematics or a simple XOR operator can help you to arrive at an efficient solution to find the missing number. This problem is important from an interview POV, as it works as an entry gate towards bit manipulations. Understand the problem with the help of beautiful animations and visuals.

Actual problem on LeetCode: https://leetcode.com/problems/missing-number/

Chapters:
00:00 - Intro
00:53 - Problem Statement and Description
03:07 - Brute Force Solution
04:51 - Basic Mathematics is wonderful
07:17 - Using the XOR operator
12:59 - Dry-run of Code
14:42 - Final Thoughts

📚 Links to topics I talk about in the video:
LeetCode Problems: https://www.youtube.com/playlist?list=PLFdAYMIVJQHPaldBFQXzd59EiqfJTYkah
Other easy problems: https://www.youtube.com/playlist?list=PLFdAYMIVJQHMap2jOyU6-kHjQEL-vxlV2
Brute Force Paradigms:

📘 A text based explanation is available at: https://studyalgorithms.com

Code on Github: https://github.com/nikoo28/java-solutions/blob/master/src/main/java/leetcode/MissingNumber.java
Test-cases on Github: https://github.com/nikoo28/java-solutions/blob/master/src/test/java/leetcode/MissingNumberTest.java

📖 Reference Books:
Starting Learn to Code: https://amzn.to/36pU0JO
Favorite book to understand algorithms: https://amzn.to/39w3YLS
Favorite book for data structures: https://amzn.to/3oAVBTk
Get started for interview preparation: https://amzn.to/39ysbkJ

🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalgorithms

🎥 My Recording Gear:
Recording Light: https://amzn.to/3pAqh8O
Microphone: https://amzn.to/2MCX7qU
Recording Camera: https://amzn.to/3alg9Ky
Tablet to sketch and draw: https://amzn.to/3pM6Bi4
Surface Pen: https://amzn.to/3pv6tTs
Laptop to edit videos: https://amzn.to/2LYpMqn


💻 Get Social 💻
Follow on Facebook at: https://www.facebook.com/studyalgos
Follow on Twitter at: https://www.twitter.com/studyalgorithms
Follow on Tumblr at: https://studyalgos.tumblr.com/
Subscribe to RSS feeds: https://studyalgorithms.com/feed/
Join fan mail: http://eepurl.com/g9Dadv

#leetcode #programming #interview

Comment