Recursion Dictionary


What is wrong with this code every test case is failing ?