Skip to content

Commit

Permalink
Update and rename pythonCreate: 374-Guess-Number-Higher-or-Lower.py t…
Browse files Browse the repository at this point in the history
…o python/374-Guess-Number-Higher-Or-Lower.py
  • Loading branch information
Ahmad-A0 authored Nov 19, 2022
1 parent 432381e commit 227c1b9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
class Solution:
def guessNumber(self, n: int) -> int:
# return a num btw 1,..,n

low = 1
high = n

while True:
mid = low + (high - low)//2
mid = low + (high - low) // 2
myGuess = guess(mid)
if myGuess == 1:
low = mid + 1
Expand Down

0 comments on commit 227c1b9

Please sign in to comment.