Capgemini Engineering Interview Question

Binary search and string matching question