New Relic Interview Question

Algorithm question which was logic to solution kept having to be changed as the interviewer kept changing his mind about what needed to be presented.