Buckhill Interview Question

Algorithm question, can't remember which one