Coding interview data structure and algorithm