Driver code
$ n = 5 ; $ k = 2 ; $ A = " ABABA " ; echo " Maximum length = " ▁ . ▁ answer ( $ A , ▁ $ n , ▁ $ k ) ▁ . ▁ " " $ n = 6 ; $ k = 4 ; $ B = " HHHHHH " ; echo " Maximum length = " ▁ . ▁ answer ( $ B , ▁ $ n , ▁ $ k ) ▁ . ▁ " " ? >