Recursive functions assignment solutions