LeetCode 2481: Minimum Cuts to Divide a Circle

MathGeometry

Problem Description

Explanation:

To divide a circle into n equal slices, we need to make n cuts. Each straight cut can be either through the center of the circle or touching the edge and passing through the center. The first cut will not divide the circle into distinct parts.

The minimum number of cuts needed to divide a circle into n equal slices is n for n > 1.

  • Time Complexity: O(1)
  • Space Complexity: O(1)

Solutions

class Solution {
    public int minCuts(int n) {
        if (n <= 1) {
            return 0;
        }
        return n;
    }
}

Loading editor...