Find the indices with anagram match

Given a String and a pattern find all the indices at which where we find an anagram match. 
For example:
String : BACDGABCDA 
Pattern : ABCD 
            We can find a match at {0, 5, 6} In other words, if we find 4 consecutive characters from these indices, it contains the characters needed to match the pattern.
CODE

Comments

Popular posts from this blog

Female co passenger hack

C library function - qsort()

Wildcard Pattern Matching (DP)