Skip to content

Commit dd305b6

Browse files
committed
Runtime: 34 ms (Top 44.53%) | Memory: 44.1 MB (Top 26.48%)
1 parent 13d1907 commit dd305b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/L/Largest Divisible Subset/Largest Divisible Subset.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 34 ms (Top 44.53%) | Memory: 44.1 MB (Top 26.48%)
12
class Solution {
23
public List<Integer> largestDivisibleSubset(int[] nums) {
34
Arrays.sort(nums);
@@ -20,7 +21,7 @@ public List<Integer> largestDivisibleSubset(int[] nums) {
2021
if(dp[i] > maxi){
2122
maxi = dp[i];
2223
lastindex = i;
23-
}
24+
}
2425
}
2526
}//for ends
2627
ans.add(nums[lastindex]);
@@ -31,4 +32,4 @@ public List<Integer> largestDivisibleSubset(int[] nums) {
3132
return ans;
3233
}
3334

34-
}
35+
}

0 commit comments

Comments
 (0)