From 2c7db9e9c48d543cd8c79bb521aec36da866229d Mon Sep 17 00:00:00 2001 From: YOUNGJIN NA <120540450+ppxyn1@users.noreply.github.com> Date: Sun, 18 Jan 2026 12:37:15 +0900 Subject: [PATCH] [:solved] #235 --- missing-number/ppxyn1.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 missing-number/ppxyn1.py diff --git a/missing-number/ppxyn1.py b/missing-number/ppxyn1.py new file mode 100644 index 0000000000..7675528a70 --- /dev/null +++ b/missing-number/ppxyn1.py @@ -0,0 +1,12 @@ +# idea : - +# Time Complexity : below O(n^2) + +class Solution: + def missingNumber(self, nums: List[int]) -> int: + nums.sort() + for i in range(len(nums)): + if nums[i] != i: + return i + return len(nums) + +