Skip to content

Commit 3a6c8a3

Browse files
Implemented Suffix Tree Data Structure.
Added some comments to my files in TheAlgorithms#11532, TheAlgorithms#11554.
1 parent d8eb924 commit 3a6c8a3

File tree

10 files changed

+40
-20
lines changed

10 files changed

+40
-20
lines changed

Diff for: data_structures/kd_tree/build_kdtree.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11532
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11532
23
# https://github.com/TheAlgorithms/Python/pull/11532
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
from data_structures.kd_tree.kd_node import KDNode

Diff for: data_structures/kd_tree/example/example_usage.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11532
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11532
23
# https://github.com/TheAlgorithms/Python/pull/11532
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
import numpy as np

Diff for: data_structures/kd_tree/example/hypercube_points.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11532
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11532
23
# https://github.com/TheAlgorithms/Python/pull/11532
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
import numpy as np

Diff for: data_structures/kd_tree/kd_node.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11532
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11532
23
# https://github.com/TheAlgorithms/Python/pull/11532
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
from __future__ import annotations

Diff for: data_structures/kd_tree/nearest_neighbour_search.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11532
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11532
23
# https://github.com/TheAlgorithms/Python/pull/11532
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
from data_structures.kd_tree.kd_node import KDNode

Diff for: data_structures/kd_tree/tests/test_kdtree.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11532
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11532
23
# https://github.com/TheAlgorithms/Python/pull/11532
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
import numpy as np

Diff for: data_structures/suffix_tree/example/example_usage.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11554
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11554
23
# https://github.com/TheAlgorithms/Python/pull/11554
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
from data_structures.suffix_tree.suffix_tree import SuffixTree

Diff for: data_structures/suffix_tree/suffix_tree.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11554
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11554
23
# https://github.com/TheAlgorithms/Python/pull/11554
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
from data_structures.suffix_tree.suffix_tree_node import SuffixTreeNode

Diff for: data_structures/suffix_tree/suffix_tree_node.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11554
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11554
23
# https://github.com/TheAlgorithms/Python/pull/11554
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
from __future__ import annotations

Diff for: data_structures/suffix_tree/tests/test_suffix_tree.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #11554
1+
# Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
2+
# in Pull Request: #11554
23
# https://github.com/TheAlgorithms/Python/pull/11554
34
#
4-
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
5+
# Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
6+
# addressing bugs/corrections to this file.
57
# Thank you!
68

79
import unittest

0 commit comments

Comments
 (0)