Skip to content

Commit e97a0ad

Browse files
committed
Time: 194 ms (5.12%), Space: 116.9 MB (5.03%) - LeetHub
1 parent 166c05a commit e97a0ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution {
2+
public int minPartitions(String n) {
3+
int answer = 0;
4+
int[] digits = Stream.of(n.split("")).mapToInt(Integer::parseInt).toArray();
5+
for(int x : digits){
6+
if(x > answer)
7+
answer = x;
8+
}
9+
return answer;
10+
}
11+
}

0 commit comments

Comments
 (0)