Zennify interview question

Facebook style algorithmic coding challenge in javascript