Red black tree sort/Wren: Difference between revisions
Content deleted Content added
Improved approach to check for duplicates - see talk page. |
Fixed syntax highlighting. |
||
Line 2:
Although red black trees don't necessarily need to disallow duplicate keys, I've adjusted the code to optionally disallow them. Not that it matters here as the method of constructing the random keys ensures that there will be no duplicates in any case.
<
/* Represents a node in the red-black tree. */
Line 425:
System.print(deletions)
System.print()
bst.prettyPrint()</
{{out}}
|