Determine if two strings/phrases are valid Anagrams | Study Algorithms

Опубликовано: 16 Октябрь 2024
на канале: Nikhil Lohia
6,201
165

Two words or phrases are said to be anagrams of each other if they can be formed by re-shuffling of characters in one of them. So if you are given two strings str1 and str2. Write a function to determine if str1 is an anagram of str2.

00:00 - Intro
00:26 - Problem description and test cases
01:57 - Brute Force Solution
03:42 - Optimized approach (Solving in O(n))
06:26 - Dry run of the code

The problem description and solution is available at: https://studyalgorithms.com/string/va...

Read More:
More string based algorithms can be found here: https://studyalgorithms.com/category/...
Pangrams: https://studyalgorithms.com/string/pa...

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

💻 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/

#studyAlgorithms #programming #interview