LeetCode solutions

2575. Minimum Cuts to Divide a Circle

My accepted Python solution to LeetCode problem 2575, Minimum Cuts to Divide a Circle, running in 0ms.

  • Difficulty: Easy
  • Python
  • Runtime 0ms
  • Memory 17.2MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 0ms, memory 17.2MB, accepted 2026-01-01.

python
class Solution:
    def numberOfCuts(self, n: int) -> int:
        if n == 1:
            return 0
        return n if n % 2 == 1 else n // 2

Source