Permutation in String | Anagram of string s1 in string s2 | Leetcode #567
This video explains a very important programming interview question which is based on strings and anagrams concept. The problem is to find if there is any permutation of string s1 present in string s2. This problem is same as finding if any substring of string s2 is an anagram of string s1. Two strings can be anagrams if they are of same length. Therefore, in order to check all substrings of s2, we need to only check substrings of size equal to length of s1. For doing this, the best algorithm is to use sliding window approach. I have explained the intuitive sliding window technique using examples and at the end of the video i have explained the CODE for this algorithm. CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
LinkedIn: https://www.linkedin.com/in/surya-pratap-kahar-47bb01168
CODE LINK: https://gist.github.com/SuryaPratapK/0244f464e5736cae9cbd0e403df83e70
SIMILAR PROBLEMS:-
Find All Anagrams in a String: https://youtu.be/fYgU6Bi2fRg
Group anagrams: https://youtu.be/0I6IL3TnIZs
Check if two strings are anagrams: https://youtu.be/QZmh8-Auqo8
Видео Permutation in String | Anagram of string s1 in string s2 | Leetcode #567 канала TECH DOSE
LinkedIn: https://www.linkedin.com/in/surya-pratap-kahar-47bb01168
CODE LINK: https://gist.github.com/SuryaPratapK/0244f464e5736cae9cbd0e403df83e70
SIMILAR PROBLEMS:-
Find All Anagrams in a String: https://youtu.be/fYgU6Bi2fRg
Group anagrams: https://youtu.be/0I6IL3TnIZs
Check if two strings are anagrams: https://youtu.be/QZmh8-Auqo8
Видео Permutation in String | Anagram of string s1 in string s2 | Leetcode #567 канала TECH DOSE
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Remove K digits | Build lowest number | Leetcode #402](https://i.ytimg.com/vi/3QJzHqNAEXs/default.jpg)
![Find All Anagrams in a String | Sliding window | Leetcode #438](https://i.ytimg.com/vi/fYgU6Bi2fRg/default.jpg)
![Minimum edit distance | Dynamic programming | Backtracking](https://i.ytimg.com/vi/AuYujVj646Q/default.jpg)
![How to crack dream job in just 2 months](https://i.ytimg.com/vi/gX8ZapEkpUY/default.jpg)
![String permutation algorithm | All permutations of a string](https://i.ytimg.com/vi/GuTPwotSdYw/default.jpg)
![Rolling hash | Rabin karp algorithm | Pattern searching](https://i.ytimg.com/vi/BQ9E-2umSWc/default.jpg)
![Odd Even Linked List | Leetcode #328 | Segregate odd even inplace](https://i.ytimg.com/vi/YE9ggKeHeK0/default.jpg)
![Kth Smallest Element in a BST | Leetcode #230](https://i.ytimg.com/vi/KqMm81Y7j9M/default.jpg)
![Uncrossed Lines | Dynamic programming | Leetcode #1035](https://i.ytimg.com/vi/duCx_62nMOA/default.jpg)
![Maximum Sum Circular Subarray | Leetcode #918](https://i.ytimg.com/vi/Q1TYVUEr-wY/default.jpg)
![Longest palindromic substring | Dynamic programming](https://i.ytimg.com/vi/UflHuQj6MVA/default.jpg)
![Counting Bits | Leetcode #338](https://i.ytimg.com/vi/awxaRgUB4Kw/default.jpg)
![Possible Bipartition | Bipartite graph | Graph coloring | Leetcode #886](https://i.ytimg.com/vi/0ACfAqs8mm0/default.jpg)
![Sliding Window Technique - Algorithmic Mental Models](https://i.ytimg.com/vi/MK-NZ4hN7rs/default.jpg)
![Jump game | Leetcode #55 | Valley peak approach](https://i.ytimg.com/vi/muDPTDrpS28/default.jpg)
![Counting inversions in an array](https://i.ytimg.com/vi/owZhw-A0yWE/default.jpg)
![Interval List Intersections | Leetcode #986](https://i.ytimg.com/vi/Qh8ZjL1RpLI/default.jpg)
![Contiguous array | Leetcode #525](https://i.ytimg.com/vi/9ZyLjjk536U/default.jpg)
![Count Square Submatrices with All Ones | Dynamic Programming | Rolling Hash | Leetcode #1277](https://i.ytimg.com/vi/Z2h3rkVXPeQ/default.jpg)
![Surrounded Regions | Leetcode #130](https://i.ytimg.com/vi/0ZJViJEdtEc/default.jpg)