Simple programming challenge for interview