Slow JS DP
\nvar largestDivisibleSubset = function(nums) {\n    if ( ! nums.length ) return []\n    nums.sort((a,b)=>a-b)\n    var dp = Array.from({length:nums.length},(_,
```\nvar largestDivisibleSubset = function(nums) {\n    if ( ! nums.length ) return []\n    nums.sort((a,b)=>a-b)\n    var dp = Array.from({length:nums.length},(_,i)=>[nums[i]])\n\n    for(let i=nums.length-1;i>=0;i--){\n        for ( let j = i + 1; j < nums.length; j++ ){\n            if ( dp[i].length <= dp[j].length && dp[j][0] % nums[i] === 0 ) {\n                dp[i] = [ nums[i], ...dp[j] ]\n            }\n        }\n    }\n\n    return dp.reduce( (a,x) => a.length > x.length ? a : x )\n}\n```
['JavaScript']