Skip to content

Commit 2666344

Browse files
authored
contents: 2 grammar fixes for linked list doc (#596)
1 parent c3a287d commit 2666344

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/website/contents/algorithms/linked-list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Be familiar with the following routines because many linked list questions make
9696

9797
### Sentinel/dummy nodes
9898

99-
Adding a sentinel/dummy node at the head and/or tail might help to handle many edge cases where operations have to be performed at the head or the tail. The presence of dummy nodes essentially ensures that operations will never have be done on the head or the tail, thereby removing a lot of headache in writing conditional checks to dealing with null pointers. Be sure to remember to remove them at the end of the operation.
99+
Adding a sentinel/dummy node at the head and/or tail might help to handle many edge cases where operations have to be performed at the head or the tail. The presence of dummy nodes essentially ensures that operations will never be done on the head or the tail, thereby removing a lot of headache in writing conditional checks to dealing with null pointers. Be sure to remember to remove them at the end of the operation.
100100

101101
### Two pointers
102102

@@ -108,7 +108,7 @@ Two pointer approaches are also common for linked lists. This approach is used f
108108

109109
### Using space
110110

111-
Many linked list problems can be easily solved by creating a new linked list and adding nodes to the new linked list with the final result. However, this takes up extra space and makes the question much less challenging. The interviewer will usually request that you modify the linked list in-place and the solve the problem without additional storage. You can borrow ideas from the [Reverse a Linked List](https://leetcode.com/problems/reverse-linked-list/) problem.
111+
Many linked list problems can be easily solved by creating a new linked list and adding nodes to the new linked list with the final result. However, this takes up extra space and makes the question much less challenging. The interviewer will usually request that you modify the linked list in-place and solve the problem without additional storage. You can borrow ideas from the [Reverse a Linked List](https://leetcode.com/problems/reverse-linked-list/) problem.
112112

113113
### Elegant modification operations
114114

0 commit comments

Comments
 (0)