GlobalLogic Interview Question

String manipulation question, rectangle overlapping and multithreading concept.