Completing last part of DataStructure task with RB-Tree model #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes multiple changes across various files to improve the codebase, including renaming files, updating imports, adding new functionalities, and configuring project settings. The most important changes include the introduction of a Red-Black Tree implementation, updates to the project structure, and the addition of configuration files for project dependencies and formatting.
Project Structure and Configuration:
setup.py
: Added a new setup script to define the package distribution foralgo_labs
..idea/etu_algo_labs.iml
: Updated project configuration to exclude the.venv
folder and set the JDK to Python 3.12.pyproject.toml
: Added configuration for theblack
code formatter, specifying line length, target version, and excluded directories.Code Refactoring and Improvements:
src/ShuntingYard/solution.py
and related files: Renamed files and updated imports to follow a consistent naming convention and directory structure. [1] [2] [3] [4] [5] [6]README.md
: Updated import statements in the example code to reflect the new directory structure.Red-Black Tree Implementation:
src/tree/red_black_tree.py
: Added a new Red-Black Tree implementation, including methods for insertion, deletion, rotation, and traversal.src/tree/nodes.py
: Introduced abstract and concrete classes for tree nodes, includingTreeNode
andBinaryTreeNode
.src/tree/main.py
: Added a script to demonstrate tree traversals and build a Red-Black Tree from a binary tree.src/tree/parser.py
: Implemented a parser to build a binary tree from a string representation.src/tree/binary_tree.py
: Added aBinaryTree
class with methods for traversal and deletion.These changes improve the project structure, enhance the functionality with a new data structure, and ensure consistent code formatting and configuration.