Wise interview question

Kind of basic CS theory.