Пример #1
0
 def test_aa(self):
     self.assertEqual(substringAnagrams("aa"), 1)
Пример #2
0
 def test_big_0(self):
     s = "dbcfibibcheigfccacfegicigcefieeeeegcghggdheichgafhdigffgifidfbeaccadabecbdcgieaffbigffcecahafcafhcdg"
     self.assertEqual(substringAnagrams(s), 1464)
Пример #3
0
 def test_big_1(self):
     s = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
     self.assertEqual(substringAnagrams(s), 166650)
Пример #4
0
 def test_ifailuhkqq(self):
     self.assertEqual(substringAnagrams("ifailuhkqq"), 3)
Пример #5
0
 def test_cdcd(self):
     self.assertEqual(substringAnagrams("cdcd"), 5)
Пример #6
0
 def test_abcd(self):
     self.assertEqual(substringAnagrams("abcd"), 0)
Пример #7
0
 def test_abba(self):
     self.assertEqual(substringAnagrams("abba"), 4)
Пример #8
0
 def test_40_a(self):
     self.assertEqual(
         substringAnagrams("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
         10660)