-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
408a603
commit d7e9040
Showing
8 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
# read version from installed package | ||
from importlib.metadata import version | ||
__version__ = version("datastructpy") | ||
__version__ = version("datastructpy") | ||
|
||
# Import key submodules or classes for easy access | ||
from .node import Node | ||
from .non_linear.trees.binary_search_trees import BinarySearchTree | ||
|
||
# Define the public API of the package | ||
__all__ = [ | ||
"__version__", | ||
"Node", | ||
"BinarySearchTree", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Node: | ||
""" | ||
A class representing a node in a binary search tree (BST). | ||
Attributes | ||
---------- | ||
key : int | ||
The value stored in the node. | ||
left : Node, optional | ||
The left child node (default is None). | ||
right : Node, optional | ||
The right child node (default is None). | ||
""" | ||
def __init__(self, key): | ||
self.key = key | ||
self.left = None | ||
self.right = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
from datastructpy import datastructpy | ||
|
||
# To do: Delete file later |