Anagram

A collection of 2 post

Find All Anagrams (Hash, Two-Pointer, Sliding Window)

Problem Write a program that counts the number of substrings of S that are anagrams and T strings in S string. When identifying anagrams, case is sensitive. Substrings must be contiguous strings. input The first S string is entered on the first line, and the T string is entered on the second line…

Anagram (Hash)

Problem Anagrams Two words are said to be anagrams when two strings differ in alphabetical order, but their composition matches. For example, AbaAeCe and baeeACA have different alphabets, but if you look at their composition, they are A(2), a(1), b(1), C(1), e(2), the alphabets and their numbers…