Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public ref class Example
// </Snippet3>
Display(sentence, "Test 2: Move first node to be last node:");

// Change the last node be 'yesterday'.
// Change the last node to 'yesterday'.
sentence->RemoveLast();
sentence->AddLast("yesterday");
Display(sentence, "Test 3: Change the last node to 'yesterday':");
Expand All @@ -48,7 +48,7 @@ public ref class Example


// <Snippet12>
// Indicate, by using parentheisis, the last occurence of 'the'.
// Indicate the last occurence of 'the'.
sentence->RemoveFirst();
LinkedListNode<String^>^ current = sentence->FindLast("the");
// </Snippet12>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void Main()
// </Snippet3>
Display(sentence, "Test 2: Move first node to be last node:");

// Change the last node be 'yesterday'.
// Change the last node to 'yesterday'.
sentence.RemoveLast();
sentence.AddLast("yesterday");
Display(sentence, "Test 3: Change the last node to 'yesterday':");
Expand All @@ -44,7 +44,7 @@ public static void Main()


// <Snippet12>
// Indicate, by using parentheisis, the last occurence of 'the'.
// Indicate the last occurence of 'the'.
sentence.RemoveFirst();
LinkedListNode<string> current = sentence.FindLast("the");
// </Snippet12>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Public Class Example
sentence.AddLast(mark1)
' </Snippet3>
Display(sentence, "Test 2: Move first node to be last node:")
' Change the last node be 'later'.
' Change the last node to 'yesterday'.
sentence.RemoveLast()
sentence.AddLast("later")
Display(sentence, "Test 3: Change the last node to 'later':")
sentence.AddLast("yesterday")
Display(sentence, "Test 3: Change the last node to 'yesterday':")
' <Snippet4>
' Move the last node to be the first node.
mark1 = sentence.Last
Expand All @@ -36,7 +36,7 @@ Public Class Example
' </Snippet4>
Display(sentence, "Test 4: Move last node to be first node:")
' <Snippet12>
' Indicate, by using parentheisis, the last occurence of 'the'.
' Indicate the last occurence of 'the'.
sentence.RemoveFirst()
Dim current As LinkedListNode(Of String) = sentence.FindLast("the")
' </Snippet12>
Expand Down Expand Up @@ -159,35 +159,50 @@ End Class
'The linked list values:
'the fox jumps over the dog
'Test 1: Add 'today' to beginning of the list:
'today the fox jumps over the dog
'today the fox jumps over the dog

'Test 2: Move first node to be last node:
'the fox jumps over the dog today
'Test 3: Change the last node to 'later':
'the fox jumps over the dog later
'the fox jumps over the dog today

'Test 3: Change the last node to 'yesterday':
'the fox jumps over the dog yesterday

'Test 4: Move last node to be first node:
'later the fox jumps over the dog
'yesterday the fox jumps over the dog

'Test 5: Indicate last occurence of 'the':
'the fox jumps over (the) dog

'Test 6: Add 'lazy' and 'old' after 'the':
'the fox jumps over (the) lazy old dog

'Test 7: Indicate the 'fox' node:
'the (fox) jumps over the lazy old dog

'Test 8: Add 'quick' and 'brown' before 'fox':
'the quick brown (fox) jumps over the lazy old dog

'Test 9: Indicate the 'dog' node:
'the quick brown fox jumps over the lazy old (dog)

'Test 10: Throw exception by adding node (fox) already in the list:
'Exception message: The LinkedList node belongs a LinkedList.

'Test 11: Move a referenced node (fox) before the current node (dog):
'the quick brown jumps over the lazy old fox (dog)

'Test 12: Remove current node (dog) and attempt to indicate it:
'Node 'dog' is not in the list.

'Test 13: Add node removed in test 11 after a referenced node (brown):
'the quick brown (dog) jumps over the lazy old fox

'Test 14: Remove node that has the value 'old':
'the quick brown dog jumps over the lazy fox

'Test 15: Remove last node, cast to ICollection, and add 'rhinoceros':
'the quick brown dog jumps over the lazy rhinoceros
'the quick brown dog jumps over the lazy rhinoceros

'Test 16: Copy the list to an array:
'the
'quick
Expand All @@ -198,7 +213,7 @@ End Class
'the
'lazy
'rhinoceros

'Test 17: Clear linked list. Contains 'jumps' = False
'
' </Snippet1>

' </Snippet1>