Skip to content

Instantly share code, notes, and snippets.

View Rui-qi-Li's full-sized avatar

Ruiqi Li Rui-qi-Li

View GitHub Profile
@Rui-qi-Li
Rui-qi-Li / BST.py
Created February 7, 2019 23:54
create Binary Search Tree in Python including Node class and BST class
class Node:
def __init__(self,data):
self.data = data
self.left = None
self.right = None
def getChildren(self):
children=[]
if self.left:
children.append(self.left)
if self.right: