Bitwise Interview Question

Write a program for following: i/p: aaabbbabacdeabbbba o/p: abcde