AdNabu interview question

First was related to assignment problem of first round then second was normal recursion problem