CLEAR Interview Question

String Based coding question and one array based code