DP easy solution || recursive dp
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\nO(n*fuel)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int dp[101][201];\n\n    int getans(int i, int fuel, int finish, vector<int>& loc){\n        if(fuel < 0) return 0;\n        if(dp[i][fuel] != -1) return dp[i][fuel];\n\n        int ans = 0;\n        if(i == finish) ans++;\n        \n        for(int j = 0; j < loc.size(); j++){\n            if(i != j) ans = (ans + getans(j, fuel - abs(loc[i] - loc[j]), finish, loc)) % 1000000007;\n        }\n        return dp[i][fuel] = ans;\n    }\n\n    int countRoutes(vector<int>& locations, int start, int finish, int fuel) {\n        memset(dp, -1, sizeof dp);\n        return getans(start, fuel, finish, locations);\n\n    }\n};\n```
['Dynamic Programming', 'Recursion', 'C++']