easily understandable python solution with explanation 
Basic idea: \nopt[i] = largest divisible subset that contains nums[i] from elements from 0 to i\n\nSteps:\n1.) sort nums\n2.) to find opt[i], we need to travers
Basic idea: \nopt[i] = largest divisible subset that contains nums[i] from elements from 0 to i\n\nSteps:\n1.) sort nums\n2.) to find opt[i], we need to traverse through nums looking for nums[j] such that nums[i] is divisible nums[j] and that opt[j] is the biggest in size. We can be sure that all the elements in opt[j] can divide nums[i] because of transitive property as nums is sorted\n3.) traverse through opt array and return the subset with max size\n\n```class Solution:\n    def largestDivisibleSubset(self, nums):\n        """\n        :type nums: List[int]\n        :rtype: List[int]\n        """\n        nums.sort()\n        opt = [[nums[i]] for i in range(len(nums))]\n        for i in range(1, len(nums)):\n            for j in range(i-1, -1, -1):\n                if nums[i] % nums[j] == 0:\n                    if len(opt[j])+1 > len(opt[i]): \n                        opt[i] = list(opt[j]) \n                        opt[i].append(nums[i])\n        maxcount = 0\n        ans = []\n        for temp in opt:\n            if len(temp) > maxcount:\n                ans = temp\n                maxcount = len(temp)\n        return ans\n```
[]