Fix cache, recursion and test.
Fix cache, recursion and test.

    Use instance cache: https://oj.leetcode.com/faq/
    Recursion: minimum cannot below zero.
    Fix test case and use unittest.

fossilet/leetcode,fossilet/leetcode,deput/leetcode,deput/leetcode