Concise C++ DP - Memory less than 100 %
Memory Efficient DP Solution:\n\nclass Solution {\npublic:\n    int nthSuperUglyNumber(int n, vector<int>& primes) \n    {\n        int k = primes.size();\n    
Memory Efficient DP Solution:\n```\nclass Solution {\npublic:\n    int nthSuperUglyNumber(int n, vector<int>& primes) \n    {\n        int k = primes.size();\n        if(n <= 0)\n            return 0;\n        if(n == 1)\n            return 1;\n        \n        vector <int> pointers(k, 0), v(n);\n        v[0] = 1;\n        \n        for(int i = 1; i < n; i++)\n        {\n            v[i] = INT_MAX;\n            for(int j = 0; j < k; j++)\n                v[i] = min(v[i], v[pointers[j]] * primes[j]);\n            \n            for(int j = 0; j < k; j++)\n            {\n                if(v[i] == v[pointers[j]] * primes[j])\n                    pointers[j]++;\n            }\n        }\n        \n        return v[n-1];\n    }\n};\n```\n\nSimilar easy problem: [Ugly Number-II](https://leetcode.com/problems/ugly-number-ii/)
['Dynamic Programming', 'C', 'C++']