Skip to content

Commit

Permalink
Code style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekhleb committed Dec 17, 2020
1 parent de1cc0b commit e220450
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/algorithms/linked-list/traversal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The task is to traverse the given linked list in straight order.

For example for the following linked list:

![](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)
![Singly linked list](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)

The order of traversal should be:

Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/linked-list/traversal/README.ru-RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Например, для следующего связного списка:

![](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)
![Singly linked list](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)

Порядок обхода будет такой:

Expand Down
6 changes: 2 additions & 4 deletions src/data-structures/linked-list/__test__/LinkedList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,18 @@ describe('LinkedList', () => {
let node = linkedList.find({ value: 3 });
expect(node.value).toBe(4);

node = linkedList.find({ callback: value => value < 3 });
node = linkedList.find({ callback: (value) => value < 3 });
expect(node.value).toBe(1);
});

it('should convert to array', () => {
const linkedList = new LinkedList();

linkedList.append(1);
linkedList.append(2);
linkedList.append(3);

expect(linkedList.toArray().join(',')).toBe('1,2,3');
});

it('should reverse linked list', () => {
const linkedList = new LinkedList();

Expand Down

0 comments on commit e220450

Please sign in to comment.