Skip to content

Commit 15b9075

Browse files
authored
Create Minimum Cuts to Divide a Circle.java
1 parent e6f5241 commit 15b9075

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Solution {
2+
public int numberOfCuts(int n) {
3+
return n == 1 ? 0 : (n % 2 == 0 ? n / 2 : n);
4+
}
5+
}

0 commit comments

Comments
 (0)