Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)
def test_advanced_anagrams(self):
self.assertEqual(String.advanced_anagrams('aaabbb'), 3)
self.assertEqual(String.advanced_anagrams('ab'), 1)
self.assertEqual(String.advanced_anagrams('abc'), -1)
self.assertEqual(String.advanced_anagrams('mnop'), 2)
self.assertEqual(String.advanced_anagrams('xyyx'), 0)
self.assertEqual(String.advanced_anagrams('xaxbbbxx'), 1)
self.assertEqual(String.advanced_anagrams('xaxbbbxa'), 1)
self.assertEqual(String.advanced_anagrams('abxxabbx'), 1)
self.assertEqual(String.advanced_anagrams('hhpddlnnsjfoyxpciioigvjqzfbpllssuj'), 10)
self.assertEqual(String.advanced_anagrams('xulkowreuowzxgnhmiqekxhzistdocbnyozmnqthhpievvlj'), 13)
self.assertEqual(String.advanced_anagrams('dnqaurlplofnrtmh'), 5)
self.assertEqual(String.advanced_anagrams('aujteqimwfkjoqodgqaxbrkrwykpmuimqtgulojjwtukjiqrasqejbvfbixnchzsahpnyayutsgecwvcqngzoehrmeeqlgknnb'), 26)
self.assertEqual(String.advanced_anagrams('lbafwuoawkxydlfcbjjtxpzpchzrvbtievqbpedlqbktorypcjkzzkodrpvosqzxmpad'), 15)
self.assertEqual(String.advanced_anagrams('drngbjuuhmwqwxrinxccsqxkpwygwcdbtriwaesjsobrntzaqbe'), -1)
self.assertEqual(String.advanced_anagrams('ubulzt'), 3)
self.assertEqual(String.advanced_anagrams('vxxzsqjqsnibgydzlyynqcrayvwjurfsqfrivayopgrxewwruvemzy'), 13)
self.assertEqual(String.advanced_anagrams('xtnipeqhxvafqaggqoanvwkmthtfirwhmjrbphlmeluvoa'), 13)
self.assertEqual(String.advanced_anagrams('gqdvlchavotcykafyjzbbgmnlajiqlnwctrnvznspiwquxxsiwuldizqkkaawpyyisnftdzklwagv'), -1)