Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DataStructures/AATree/AATree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private AaTreeNode<TKey> Add(TKey key, AaTreeNode<TKey>? node)
}
else
{
throw new ArgumentException($"Key \"{key}\" already in tree!", nameof(key));
throw new ArgumentException($"""Key "{key}" already in tree!""", nameof(key));
}

return Split(Skew(node))!;
Expand Down
5 changes: 2 additions & 3 deletions DataStructures/AVLTree/AVLTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ private AvlTreeNode<TKey> Add(AvlTreeNode<TKey> node, TKey key)
}
else
{
throw new ArgumentException(
$"Key \"{key}\" already exists in AVL tree.");
throw new ArgumentException($"""Key "{key}" already exists in AVL tree.""");
}

// Check all of the new node's ancestors for inbalance and perform
Expand All @@ -382,7 +381,7 @@ private AvlTreeNode<TKey> Add(AvlTreeNode<TKey> node, TKey key)
if (node == null)
{
throw new KeyNotFoundException(
$"Key \"{key}\" is not in the AVL tree.");
$"""Key "{key}" is not in the AVL tree.""");
}

// Normal binary search tree removal
Expand Down
2 changes: 1 addition & 1 deletion DataStructures/BinarySearchTree/BinarySearchTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private void Add(BinarySearchTreeNode<TKey> node, TKey key)
// Key is already in tree.
else
{
throw new ArgumentException($"Key \"{key}\" already exists in tree!");
throw new ArgumentException($"""Key "{key}" already exists in tree!""");
}
}

Expand Down
4 changes: 2 additions & 2 deletions DataStructures/RedBlackTree/RedBlackTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void Add(TKey key)
{
addCase = GetAddCase(node);

switch(addCase)
switch (addCase)
{
case 1:
break;
Expand Down Expand Up @@ -339,7 +339,7 @@ private RedBlackTreeNode<TKey> Add(RedBlackTreeNode<TKey> node, TKey key)
}
else
{
throw new ArgumentException($"Key \"{key}\" already exists in tree!");
throw new ArgumentException($"""Key "{key}" already exists in tree!""");
}
}

Expand Down
Loading