Kikoff interview question

leet code type problems. nothing unusual