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

Red black tree implemented in Dart - #2163 resolved #3009

Merged
merged 1 commit into from
May 30, 2020

Conversation

Rukmini-Meda
Copy link
Contributor

Fixes #2163

Checklist:

  • 4 space indentation.
  • Coding conventions are followed.
  • Input is taken dynamically.
  • Sample Input / Output is added at the end of file.
  • Logic Documentation (Comments).
  • File names are correct.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

Changes proposed in this pull request:

  • Red black tree is implemented in Dart

Languages Used:

  • Dart

Files Added:

  • Red_Black_Tree.dart

We're happy to help you get this ready -- don't be afraid to ask for help.

Thanks!

Comment on lines 2 to 16
* Red Black Tree
* -------------------------------
* RB Tree is a self balancing tree which is of O(logn) time complexity
* for various operations. It has 4 balancing rules as follows:
*
* 1. Nodes are of either red or black color.
* 2. Root is always black.
* 3. Red node should not have red children
* 4. Every path from a node (including root) to any of its descendant
* NULL node has the same number of black nodes.
*
* References - Geeksforgeeks
*
*/

// Importing required libraries
import 'dart:io';
Copy link
Collaborator

Choose a reason for hiding this comment

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

refer the other PR , do the changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@asha15 Like I have mentioned in other PRs as well, I have written documentation on my own and used gfg to understand the algorithm only. I have written what I have understood.

@Rukmini-Meda
Copy link
Contributor Author

@asha15 I have removed references and squashed the commits. Please merge.

@asha15 asha15 merged commit b460d6f into jainaman224:master May 30, 2020
@Rukmini-Meda Rukmini-Meda deleted the RedBlackTree_Dart branch May 31, 2020 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Red Black Tree
2 participants