Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 372 Bytes

Question_2481.md

File metadata and controls

18 lines (15 loc) · 372 Bytes

LeetCode Records - Question 2481 Minimum Cuts to Divide a Circle

Attempt 1: Check if it is even

class Solution {
    public int numberOfCuts(int n) {
        if (n == 1) {
            return 0;
        }
        
        return n % 2 == 0 ? n / 2 : n;
    }
}
  • Runtime: 0 ms (Beats: 100.00%)
  • Memory: 40.20 MB (Beats: 63.14%)