diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -11,7 +11,7 @@
     def findMaxK(self, nums: List[int]) -> int:
         nums = sorted(nums, reverse=True)
         s = set(nums)
-        for i in range(len(nums) + 1):
-            if nums[i] in s:
+        for i in range(len(nums)):
+            if 0 - nums[i] in s:
                 return nums[i]
         return -1
