DBN interview question

it was relatively straight forward