LinkedIn interview question

Basic questions on recursion and division.