Skip to content

Instantly share code, notes, and snippets.

View rohanrkamath's full-sized avatar
Uploading your consciousness to the quantum cloud

Rohan Ranjit Kamath rohanrkamath

Uploading your consciousness to the quantum cloud
View GitHub Profile
@sudhanshuptl
sudhanshuptl / BinarySearchTree.py
Last active May 10, 2022 09:38
Binary Search tree implementation in python ( oops approach )
__author__='Sudhanshu Patel'
'''
Binary search tree implementation
# goes left if key less than node.key else right
1. insetion
2. Preorder
3. postorder
4. inorder traversal
5. find max depth
6. print all leaf node
@zjplab
zjplab / BinarySearchTree_another_version.py
Last active December 15, 2022 22:19
Binary Tree Python Implementation
# Python program to demonstrate delete operation
# in binary search tree
# A Binary Tree Node
class Node:
# Constructor to create a new node
def __init__(self, key):
self.key = key
self.left = None