Question: Problem 2 . Brute - force: Anagram Searching Two strings are defined as anagrams they contain the same characters with different order, e . g
Problem Bruteforce: Anagram Searching
Two strings are defined as anagrams they contain the same characters with different order,
eg "tac" is an anagram of "act".
Given a string S and a pattern P write a bruteforce algorithm to print all the substrings in
that are anagrams of Analyze the complexity of your solution.
Example:
Input: "fetaactacat", "act"
Output: "cta", "tac", "cat"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
