Рет қаралды 25,541
To see more videos like this, you can buy me a coffee: www.buymeacoffee.com/studyalg...
You are given an array of strings, you need to group the anagrams. Two strings are said to be anagrams if they have the exact same characters with the same frequency. The placement can change though. Watch this video to learn 2 methods to solve this problem. We will take advantage of properties of anagrams and use it in our favor. At the end we will see a dry-run of the code to see what is actually happening behind the scenes.
00:00 - Intro
01:12 - Problem statement and description
04:40 - Method 1: Categorize by Sorting
09:03 - Method 2: Categorize by Frequency
13:09 - Dry-run of Code
15:44 - Generate Frequency String
18:09 - Final Thoughts
📚 Links to topics I talk about in the video:
Brute Force Algorithm: • Brute Force algorithms...
Sorting Techniques: • Sorting Techniques
Time Complexity: • What is the Time Compl...
What is Big O?: • Big O Notation Simplif...
📘 A text based explanation is available at: studyalgorithms.com/string/le...
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 learn algorithms: amzn.to/39w3YLS
Favorite book for data structures: amzn.to/3oAVBTk
Get started for interview preparation: amzn.to/39ysbkJ
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
💻 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