Algorithm for interviews