Thoughtworks interview question

Asked Question on assignment submission