Company: UKG_20july
Difficulty: medium
Anagram Period Problem Description Say a base string s is repeatable if you can build a longer string by writing down anagrams of s one after another, as many times as needed. Given a string input_str of length n , work out the length of the shortest base string s capable of producing input_str this way. The string input_str is guaranteed to contain only 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 shortest possible base 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 reconstructed. Examples Sample Case 0: Input: abcbcacba Output: 3 Explanation: A base string s = "abc" works, since stacking its anagrams "abc", "bca", and "cba" back to back reproduces the target exactly. The full input itsel