Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e83b570

Browse files
raghav-wdraklaptudirm
andauthored
merge: fixed some spellings (#773)
* fixed some spellings * Update Data-Structures/Linked-List/SinglyLinkList.js Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com> Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
1 parent ffbfb20 commit e83b570

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎Data-Structures/Linked-List/SinglyLinkList.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SinglyLinkedList!!
2-
* A linked list is implar to an array, it hold values.
2+
* A linked list is similar to an array, it holds a list of values.
33
* However, links in a linked list do not have indexes. With
4-
* a linked list you do not need to predetermine it's size as
4+
* a linked list you do not need to predetermine its size as
55
* it grows and shrinks as it is edited. This is an example of
66
* a singly linked list.
77
*/
@@ -17,7 +17,7 @@ const LinkedList = (function () {
1717
this.head = null
1818
}
1919

20-
// class node (constructor)
20+
// Class node (constructor)
2121
// Creating Node with element's value
2222
const Node = (function () {
2323
function Node (element) {
@@ -46,12 +46,12 @@ const LinkedList = (function () {
4646
} else {
4747
let currentNode = this.head
4848

49-
// Loop till there is node present in the list
49+
// Loop till there is a node present in the list
5050
while (currentNode.next) {
5151
currentNode = currentNode.next
5252
}
5353

54-
// Adding node to the end of the list
54+
// Adding node at the end of the list
5555
currentNode.next = node
5656
}
5757
// Increment the length

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /