Skip to content

Commit cc17adc

Browse files
author
Ahmed Onawale
committed
refactor README.md file to remove the help statement
1 parent 5d20772 commit cc17adc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Linked List/README.markdown

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,7 @@ This loops through the entire list and simply swaps the `next` and `previous` po
465465
nil <---| |--->| |--->| |--->| |<--- head
466466
+--------+ +--------+ +--------+ +--------+
467467

468-
You may be wondering why the last statement says `node = node!.previous` to go to the next node instead of `node!.next` like you'd expect, but remember that we just swapped those pointers!
469-
470-
> **Note:** I couldn't find a way to make this code more Swift-like, without the forced unwrapping. Suggestions for improvements are welcome!
468+
You may be wondering why the last statement says `node = currentNode.previous` to go to the next node instead of `currentNode.next` like you'd expect, but remember that we just swapped those pointers!
471469

472470
Arrays have `map()` and `filter()` functions, and there's no reason why linked lists shouldn't either.
473471

0 commit comments

Comments
 (0)