Coolblue Interview Question

Task was difficult. Analysis has to be strong for completing the task.