Cubic interview question

what is the problem complexity ?