Skip to content

Commit d714edd

Browse files
committed
comments
1 parent 1c6bb9c commit d714edd

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

Advanced.Algorithms/DataStructures/Tree/AvlTree.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private void insert(AVLTreeNode<T> node, T value)
122122

123123

124124
/// <summary>
125-
/// Time complexity: O(log(n))
125+
/// Time complexity: O(log(n)).
126126
/// </summary>
127127
public void Delete(T value)
128128
{
@@ -280,7 +280,7 @@ private void delete(AVLTreeNode<T> node, T value)
280280
}
281281

282282
/// <summary>
283-
/// Time complexity: O(log(n))
283+
/// Time complexity: O(log(n)).
284284
/// </summary>
285285
public T FindMax()
286286
{
@@ -302,7 +302,7 @@ private AVLTreeNode<T> findMax(AVLTreeNode<T> node)
302302
}
303303

304304
/// <summary>
305-
/// Time complexity: O(log(n))
305+
/// Time complexity: O(log(n)).
306306
/// </summary>
307307
public T FindMin()
308308
{
@@ -323,7 +323,7 @@ private AVLTreeNode<T> findMin(AVLTreeNode<T> node)
323323
}
324324

325325
/// <summary>
326-
/// Time complexity: O(log(n))
326+
/// Time complexity: O(log(n)).
327327
/// </summary>
328328
public bool Contains(T value)
329329
{
@@ -536,7 +536,7 @@ private void UpdateHeight(AVLTreeNode<T> node)
536536
}
537537

538538
/// <summary>
539-
/// Get the value previous to given value in this BST.
539+
/// Get the next lower value to given value in this BST.
540540
/// Time complexity: O(log(n))
541541
/// </summary>
542542
public T NextLower(T value)
@@ -552,7 +552,7 @@ public T NextLower(T value)
552552
}
553553

554554
/// <summary>
555-
/// Get the value next to given value in this BST.
555+
/// Get the next higher value to given value in this BST.
556556
/// Time complexity: O(log(n))
557557
/// </summary>
558558
public T NextHigher(T value)

Advanced.Algorithms/DataStructures/Tree/BST.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ private BSTNodeBase<T> find(T value)
360360
}
361361

362362
/// <summary>
363-
/// Get the value previous to given value in this BST.
363+
/// Get the next lower value to given value in this BST.
364364
/// Time complexity: O(n)
365365
/// </summary>
366366
public T NextLower(T value)
@@ -376,7 +376,7 @@ public T NextLower(T value)
376376
}
377377

378378
/// <summary>
379-
/// Get the value next to given value in this BST.
379+
/// Get the next higher value to given value in this BST.
380380
/// Time complexity: O(n)
381381
/// </summary>
382382
public T NextHigher(T value)

Advanced.Algorithms/DataStructures/Tree/RedBlackTree.cs

+2-7
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ private RedBlackTreeNode<T> findMax(RedBlackTreeNode<T> node)
7474
return node.FindMax() as RedBlackTreeNode<T>;
7575
}
7676

77-
private RedBlackTreeNode<T> findMin(RedBlackTreeNode<T> node)
78-
{
79-
return node.FindMin() as RedBlackTreeNode<T>;
80-
}
81-
8277
/// <summary>
8378
/// Time complexity: O(log(n))
8479
/// </summary>
@@ -702,7 +697,7 @@ private RedBlackTreeNode<T> handleDoubleBlack(RedBlackTreeNode<T> node)
702697
}
703698

704699
/// <summary>
705-
/// Get the value previous to given value in this BST.
700+
/// Get the next lower value to given value in this BST.
706701
/// </summary>
707702
public T NextLower(T value)
708703
{
@@ -717,7 +712,7 @@ public T NextLower(T value)
717712
}
718713

719714
/// <summary>
720-
/// Get the value next to given value in this BST.
715+
/// Get the next higher to given value in this BST.
721716
/// </summary>
722717
public T NextHigher(T value)
723718
{

Advanced.Algorithms/DataStructures/Tree/SplayTree.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ private BSTNodeBase<T> find(T value)
438438
}
439439

440440
/// <summary>
441-
/// Get the value previous to given value in this BST.
441+
/// Get the next lower value to given value in this BST.
442442
/// Time complexity: O(n).
443443
/// </summary>
444444
public T NextLower(T value)
@@ -454,7 +454,7 @@ public T NextLower(T value)
454454
}
455455

456456
/// <summary>
457-
/// Get the value next to given value in this BST.
457+
/// Get the next higher value to given value in this BST.
458458
/// Time complexity: O(n).
459459
/// </summary>
460460
public T NextHigher(T value)

Advanced.Algorithms/DataStructures/Tree/TreapTree.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ private BSTNodeBase<T> find(T value)
430430
}
431431

432432
/// <summary>
433-
/// Get the value previous to given value in this BST.
433+
/// Get the next lower value to given value in this BST.
434434
/// Time complexity: O(n).
435435
/// </summary>
436436
public T NextLower(T value)
@@ -446,7 +446,7 @@ public T NextLower(T value)
446446
}
447447

448448
/// <summary>
449-
/// Get the value previous to given value in this BST.
449+
/// Get the next higher value to given value in this BST.
450450
/// Time complexity: O(n).
451451
/// </summary>
452452
public T NextHigher(T value)

0 commit comments

Comments
 (0)