Skip to content

Add Python implementations for binary search tree operations #2179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

vishnuvardhanreddy31
Copy link
Contributor

This commit introduces Python implementations for various operations and functionalities related to binary search trees (BSTs). The added files include:

  • insert_in_bst.py: Code for inserting a node into a BST.
  • search_in_bst.py: Code for searching for a node in a BST.
  • delete_a_node_in_bst.py: Code for deleting a node from a BST.
  • inorder_traversal.py: Code for implementing an in-order traversal of a BST.
  • mirror_a_bst.py: Code for creating a mirror image of a BST.
  • print_in_range.py: Code for printing all nodes in a BST that lie within a specific range of values.
  • root_to_leaf_paths.py: Code for finding all root-to-leaf paths in a BST.
  • validate_bst.py: Code for validating a BST to ensure that it follows the BST properties.

These implementations aim to enhance the functionality of the repository and provide developers with efficient tools for working with BSTs in Python projects. The code follows Python coding conventions and includes unit tests to ensure correctness and reliability.

This commit introduces Python implementations for various operations and functionalities related to binary search trees (BSTs). The added files include:

- `insert_in_bst.py`: Code for inserting a node into a BST.
- `search_in_bst.py`: Code for searching for a node in a BST.
- `delete_a_node_in_bst.py`: Code for deleting a node from a BST.
- `inorder_traversal.py`: Code for implementing an in-order traversal of a BST.
- `mirror_a_bst.py`: Code for creating a mirror image of a BST.
- `print_in_range.py`: Code for printing all nodes in a BST that lie within a specific range of values.
- `root_to_leaf_paths.py`: Code for finding all root-to-leaf paths in a BST.
- `validate_bst.py`: Code for validating a BST to ensure that it follows the BST properties.

These implementations aim to enhance the functionality of the repository and provide developers with efficient tools for working with BSTs in Python projects. The code follows Python coding conventions and includes unit tests to ensure correctness and reliability.
Copy link
Contributor

@NitkarshChourasia NitkarshChourasia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good formatting and awesome organisation.
Loved it!

@vishnuvardhanreddy31
Copy link
Contributor Author

Thank you 😊..

@NitkarshChourasia
Copy link
Contributor

NitkarshChourasia commented May 8, 2024 via email

@geekcomputers geekcomputers merged commit ef4469f into geekcomputers:master May 8, 2024
@vishnuvardhanreddy31 vishnuvardhanreddy31 deleted the binary-search-tree branch May 8, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants