Skip to content

Instantly share code, notes, and snippets.

@shiyanshirani
Created October 7, 2020 09:40
Show Gist options
  • Select an option

  • Save shiyanshirani/8180e4cac6d0e68300773fe067d20b8f to your computer and use it in GitHub Desktop.

Select an option

Save shiyanshirani/8180e4cac6d0e68300773fe067d20b8f to your computer and use it in GitHub Desktop.

Revisions

  1. shiyanshirani created this gist Oct 7, 2020.
    10 changes: 10 additions & 0 deletions search_helper.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    def search_helper(self, start_node, find_val):
    if start_node:
    if start_node.value == find_val:
    return True
    elif start_node.value > find_val:
    return self.search_helper(start_node.left, find_val)
    else:
    return self.search_helper(start_node.right, find_val)
    else:
    return False