Skip to content

Instantly share code, notes, and snippets.

Jdsleppy /
Last active March 21, 2016 01:05
2D peak finding inspired by binary search
def create_search_grid(center_point, side_length):
# Return a 3x3 grid of points, centered at center_point,
# making a square side_length tall and wide.
return grid_of_points
def stop_condition(value):
# Decide if you're at a good enough place to end the search.
# Tweak this for your own application.
return should_stop_searching