Butterfly

A string is a butterfly string if it has a 0 at the middle of the string and at both sides of 0 there are exactly the same number of positive length of characters and all the characters are same. For a given string of size, n determine if it is a butterfly string or not.


This is a companion discussion topic for the original entry at https://toph.co/p/butterfly