Vection interview question

Basic coding exercise very close to classic algorithms