ING interview question

an assignment, given one week to finish