Adding Manecher's algo implementation.