Skip to content
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

Closed
wants to merge 0 commits into from

Conversation

purnima2904
Copy link
Contributor

📥 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@purnima2904
Copy link
Contributor Author

Hello @ajay-dhangar kindly review this PR.

@ajay-dhangar ajay-dhangar added gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. hacktoberfest-accepted PRs accepted for Hacktoberfest 2024. Ensures contributions are counted towards the official Hackt... level1 GirlScript Summer of Code | Contributor's Levels labels Oct 12, 2024
Copy link
Owner

@ajay-dhangar ajay-dhangar left a 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.
Copy link
Owner

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).
Copy link
Owner

Choose a reason for hiding this comment

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

replace < with &lt;

Comment on lines 41 to 45
10B
/ \
5R 20B
/ \ / \
2B 8B 15R 25B
Copy link
Owner

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/)

Copy link

⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀

🔗 Site: Algo | Live Site

URL 🌐 Performance Accessibility Best Practices SEO 📊
/algo/ 🟡 68 🟢 92 🟡 79 🟡 86 📄
/algo/docs 🟡 56 🟢 93 🟡 79 🟢 100 📄
/algo/blog 🟡 73 🟡 88 🟢 100 🟡 86 📄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. hacktoberfest-accepted PRs accepted for Hacktoberfest 2024. Ensures contributions are counted towards the official Hackt... level1 GirlScript Summer of Code | Contributor's Levels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Searching Technique and BST
2 participants