Skip to content

Conversation

@bhavyalatha26
Copy link
Collaborator

No description provided.


# Initialize directions
directions = [(0, -1), (0, 1), (-1, 0), (1, 0)]
directions = [(0, 0), (0, 0), (0, 0), (0, 0)] #todo revert back to [(0, -1), (0, 1), (-1, 0), (1, 0)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
directions = [(0, 0), (0, 0), (0, 0), (0, 0)] #todo revert back to [(0, -1), (0, 1), (-1, 0), (1, 0)]
directions = [(0, -1), (0, 1), (-1, 0), (1, 0)]


# Initialize x and y
initial_x, initial_y = 0, 0
initial_x, initial_y = -1, -1 #todo revert back to 0,0 to resolve error
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
initial_x, initial_y = -1, -1 #todo revert back to 0,0 to resolve error
initial_x, initial_y = 0, 0

mid = (high + low) // 2
val = array[mid]
if val == query:
if val != query: # todo make this == to resolve error
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if val != query: # todo make this == to resolve error
if val == query:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants