Wolters Kluwer Interview Question

Write a program for one string logic?