Mews Interview Question

Easy algorithm question from the manager ; )