MCPcopy Create free account
hub / github.com/careercup/ctci / BinaryTree

Class BinaryTree

python/Chapter 4/Question4_4/ChapQ4.4.py:3–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import random
2#binary tree python
3class BinaryTree:
4 def __init__(self, content):
5 self.content = content
6 self.left = None
7 self.right = None
8
9 def __str__(self):
10 return "( " + str(self.content) + " ( " + str(self.left) + " | " + str(self.right) + "))"
11
12class LinkedList:
13 def __init__(self,content):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected