Frage im Vorstellungsgespräch bei Albertsons Companies

Had to do whiteboard to write algorithm to solve a problem.