HackerRank - Remove Duplicates from a Sorted Linked List | Full solution | Study Algorithms

Published: 18 June 2021
on channel: Nikhil Lohia
5,855
151

Modifying a data structure and making it optimal is a very popular programming problem. You are given a sorted linked list which has some duplicates. We need to return a list without those duplicates. One way could be to use a set of unique elements. It can also be solved efficiently without using any extra space. This video shows animations which help you understand the approach and advantage of the method. Full code implementation also available.

Chapters:
00:00 - Intro
01:05 - Problem Statement and Description
02:52 - Brute Force Method
05:49 - Efficient Method
09:47 - Dry-run of code
14:23 - Final Thoughts

Actual problem on HackerRank: https://www.hackerrank.com/challenges...

📚 Links to topics I talk about in the video:
Linked List:    • Linked List Data Structure explained with ...  
Sorting Techniques:    • Sorting Techniques  
Time Complexity of an Algorithm:    • What is the Time Complexity of an Algorith...  
HackerRank Solutions:    • HackerRank Solutions  

📘 A text based explanation is available at:

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

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

🎥 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

#hackerrank #programming #interview


On this page of the site you can watch the video online HackerRank - Remove Duplicates from a Sorted Linked List | Full solution | Study Algorithms with a duration of hours minute second in good quality, which was uploaded by the user Nikhil Lohia 18 June 2021, share the link with friends and acquaintances, this video has already been watched 5,855 times on youtube and it was liked by 151 viewers. Enjoy your viewing!