Jabong.com Interview Question

Recursive function and some logics for sorting, data structure, mysql queries