File tree Expand file tree Collapse file tree
UnitTest/DataStructuresTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1-
2- namespace DataStructures . Trees
1+ namespace DataStructures . Trees
32{
43 /// <summary>
54 /// The binary search tree node.
Original file line number Diff line number Diff line change @@ -465,7 +465,7 @@ protected bool _remove(RedBlackTreeNode<TKey> nodeToDelete)
465465 return false ;
466466 }
467467
468- // Node X moves to the original nodeToDelete position in the tree.
468+ // X it's node that will become move to original nodeToDelete position in the tree.
469469 RedBlackTreeNode < TKey > x ;
470470
471471 if ( nodeToDelete . HasOnlyRightChild )
@@ -480,7 +480,7 @@ protected bool _remove(RedBlackTreeNode<TKey> nodeToDelete)
480480 }
481481 else
482482 {
483- // Node Y moves to the original node X position in the tree.
483+ // Y it's node that will become move to original X position in the tree.
484484 var y = ( RedBlackTreeNode < TKey > ) _findMinNode ( nodeToDelete . RightChild ) ;
485485 x = y . RightChild ;
486486
@@ -523,7 +523,7 @@ protected bool _remove(RedBlackTreeNode<TKey> nodeToDelete)
523523 /// <summary>
524524 /// Insert one subtree in the place of the other in his parent.
525525 /// </summary>
526- /// <param name="replaced">Subtree replaced by <param name="replacement">.</param></param>
526+ /// <param name="replaced">Subtree of node will be replaced by <param name="replacement">.</param></param>
527527 /// <param name="replacement">Subtree replaces <param name="replaced">.</param></param>
528528 private void Transplant ( RedBlackTreeNode < TKey > replaced , RedBlackTreeNode < TKey > replacement )
529529 {
Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ public void Remove_CurrentRoot()
371371 [ Fact ]
372372 public void Remove_ThrowExceptionWhenTryRemoveNonExistentNode ( )
373373 {
374- //TODO Create more specyfic exception type for this kind of errors.
374+ //TODO Create more specyfic exception type for this kind of errors, with inheritance from ArgumentException .
375375 Assert . Throws < Exception > ( ( ) => redBlackTree . Remove ( 999 ) ) ;
376376 }
377377 }
You can’t perform that action at this time.
0 commit comments