Criteo Interview Question

they asked for optimisation and algo complexity