Bounteous x Accolite interview question

java (technical+code)