Skip to content

Commit ec11ab6

Browse files
committed
Runtime: 140 ms (Top 67.23%) | Memory: 48.3 MB (Top 43.50%)
1 parent 0761a2d commit ec11ab6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// Runtime: 140 ms (Top 67.23%) | Memory: 48.3 MB (Top 43.50%)
12
var countBalls = function(lowLimit, highLimit) {
23
let obj={};
34
for(let i=lowLimit; i<=highLimit; i++){
45
i+=''; let sum=0;
56
for(let j=0; j<i.length; j++){ sum+=i[j]*1; }
6-
obj[sum]?obj[sum]+=1:obj[sum]=1
7+
obj[sum]?obj[sum]+=1:obj[sum]=1
78
}
89
return Math.max(...Object.values(obj));
9-
};
10+
};

0 commit comments

Comments
 (0)