Company: UKG_20july
Difficulty: medium
Anagram Period Problem Description A string can be formed using another string s by repeatedly concatenating the anagrams of s any number of times. Given a string input_str , str of length n , find the length of the smallest string s that can be used to create input_str . Note that the string input_str only consists of the lowercase English letters. Function Description Complete the function getAnagramPeriod in the editor below. getAnagramPeriod has the following parameter(s): string input_str : a string of length n Returns int : the length of the smallest possible string s Constraints input_str consists of lowercase English letters 1 Input Format for Custom Testing The first line contains a string input_str , the string to be formed. Examples Sample Case 0: Input: abcbcacba Output: 3 Explanation: One possible string s is "abc"; append the anagrams of s in the order "abc", "bca", and "cba". Another possible string s is "abcbcacba"; append the string s as it is to form the given string.