-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Added RedBlack BST and Sentinel Search #442
Conversation
Hello @ajay-dhangar kindly review this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update your code based on suggestions
|
||
## Rules for constructing Red-Black Tree: | ||
- The black height of the red-black tree is the number of black nodes on a path from the root node to a leaf node. | ||
- Leaf nodes are also counted as black nodes. So, a red-black tree of height h has black height >= h/2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace >
with >
## Rules for constructing Red-Black Tree: | ||
- The black height of the red-black tree is the number of black nodes on a path from the root node to a leaf node. | ||
- Leaf nodes are also counted as black nodes. So, a red-black tree of height h has black height >= h/2. | ||
- Height of a red-black tree with n nodes is h<= 2 log2(n + 1). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace <
with <
10B | ||
/ \ | ||
5R 20B | ||
/ \ / \ | ||
2B 8B 15R 25B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace
10B
/ \
5R 20B
/ \ / \
2B 8B 15R 25B
with
```
10B
/ \
5R 20B
/ \ / \
2B 8B 15R 25B
```
OR
if possible then try to use the mermaid graph (https://mermaid.js.org/)
⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀
|
📥 Pull Request
Description
In the Binary Search Tree i have added about Red Black Tree explaining in detail its application , advantages and disadvantages , code , rules and properties
In the Searching Algorithm i have added about Sentinel Search explaining in detail about its use case , code, complexity , definition and characteristics
Fixes #436
Type of change
Checklist: