Python3 Solution
\n\nclass Solution:\n    def largestDivisibleSubset(self, nums: List[int]) -> List[int]:\n        nums.sort()\n        n=len(nums)\n        if n<2:\n           
\n```\nclass Solution:\n    def largestDivisibleSubset(self, nums: List[int]) -> List[int]:\n        nums.sort()\n        n=len(nums)\n        if n<2:\n            return nums\n        ans=[ [num] for num in nums]   \n        for i in range(n):\n            for j in range(i):\n                if nums[i]%nums[j]==0 and len(ans[i])<len(ans[j])+1:\n                    ans[i]=ans[j]+[nums[i]]\n        return max(ans,key=lambda x:len(x))             \n```
['Python', 'Python3']