maxSubsetLength -= Math.min(value, complement.get) } } } } maxSubsetLength } 代码Gist 地址为:Answer of question from https://www.hackerrank.com/challenges/non-divisible-subset/problem · GitHub