We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3fc834 commit f374a12Copy full SHA for f374a12
scripts/algorithms/N/Number Complement/Number Complement.py
@@ -1,6 +1,8 @@
1
+# Runtime: 62 ms (Top 13.03%) | Memory: 13.8 MB (Top 53.14%)
2
+
3
class Solution:
4
def findComplement(self, num: int) -> int:
5
i = 0
6
while(2**i <= num):
7
i += 1
- return (2**i - num - 1)
8
+ return (2**i - num - 1)
0 commit comments