Find the duplicate number (LeetCode 287) | Full solution with different methods | Study Algorithms

Описание к видео Find the duplicate number (LeetCode 287) | Full solution with different methods | Study Algorithms

To see more videos like this, you can buy me a coffee: https://www.buymeacoffee.com/studyalg...

You are given an array of integers, that have all unique values except one integer that may be duplicated more than 2 times. You just need to return this value. Seems like a very easy problem but it offers you a lot of scope. There can be several different solutions possible based upon the requirements. This video explores a brute force method, a time efficient method and a space efficient method. All along with easy to understand visuals and animations.

Chapters:
00:00 - Intro
01:27 - Problem statement and description
03:26 - Brute Force approach to find the duplicate number
05:13 - Find the duplicate number using sorting
07:07 - Find the duplicate number using a HashSet
10:16 - Time and space efficient solution to find duplicate
14:14 - Dry-run of code
16:50 - Final Thoughts

Actual problem on LeetCode: https://leetcode.com/problems/find-th...

📚 Links to topics I talk about in the video:
Detect Cycle Start in Linked List:    • Linked List Cycle 2 (LeetCode 142) | ...  
Linked List Introduction:    • Linked List Data Structure explained ...  
Brute Force Method:    • Brute Force algorithms with real life...  
Quick Sort:    • Quick Sort super easy explanation wit...  
Time Complexity:    • Big O Notation Simplified to the MAX ...  
Playlist on Linked Lists:    • Linked Lists  

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

Code on Github: https://github.com/nikoo28/java-solut...
Test-cases on Github: https://github.com/nikoo28/java-solut...

📖 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

🎥 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:   / studyalgos  
Follow on Twitter at:   / studyalgorithms  
Follow on Tumblr at:   / studyalgos  
Subscribe to RSS feeds: https://studyalgorithms.com/feed/
Join fan mail: http://eepurl.com/g9Dadv

#leetcode #programming #linkedlists

Комментарии

Информация по комментариям в разработке