Skip to content

Commit 7471845

Browse files
committed
Fixed typo
1 parent 34f0d7a commit 7471845

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

chap-03/doubly-linked-lists.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
require_once __DIR__ . '/../vendor/autoload.php';
1313

14-
define("SEPERATOR", PHP_EOL . "**********************************" . PHP_EOL);
14+
define("SEPARATOR", PHP_EOL . "**********************************" . PHP_EOL);
1515

1616
$bookTitles = new DoublyLinkedList();
1717

@@ -23,8 +23,8 @@
2323

2424
// Display data
2525
$bookTitles->displayForward();
26-
echo SEPERATOR;
26+
echo SEPARATOR;
2727

2828
// Display data backwards
2929
$bookTitles->displayBackward();
30-
echo SEPERATOR;
30+
echo SEPARATOR;

chap-03/linked-lists.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
require_once __DIR__ . '/../vendor/autoload.php';
1212

13-
define("SEPERATOR", PHP_EOL . "**********************************" . PHP_EOL);
13+
define("SEPARATOR", PHP_EOL . "**********************************" . PHP_EOL);
1414

1515
$bookTitles = new LinkedList();
1616

@@ -21,7 +21,7 @@
2121

2222
// Display data
2323
$bookTitles->display();
24-
echo SEPERATOR;
24+
echo SEPARATOR;
2525

2626
// Insert a new book as the first element of the list.
2727
$bookTitles->insertAtFirst("Introducing PHP to noobs");
@@ -31,47 +31,47 @@
3131
// Search for a existing title, and a non-existing title.
3232
var_dump($bookTitles->search("Introducing PHP to noobs")->data);
3333
var_dump($bookTitles->search("Clever stuff"));
34-
echo SEPERATOR;
34+
echo SEPARATOR;
3535

3636
// Insert a title before another title
3737
$bookTitles->insertBefore("Handsome developers", "Programming Intelligence");
3838

3939
$bookTitles->display();
40-
echo SEPERATOR;
40+
echo SEPARATOR;
4141

4242
// Insert a title after another title
4343
$bookTitles->insertAfter("The complex anatomy of a developer", "Introduction to Algorithms");
4444

4545
$bookTitles->display();
46-
echo SEPERATOR;
46+
echo SEPARATOR;
4747

4848
// Delete the first entry in the list
4949
var_dump($bookTitles->deleteFirst());
5050

5151
$bookTitles->display();
52-
echo SEPERATOR;
52+
echo SEPARATOR;
5353

5454
// Delete the last entry in the list
5555
var_dump($bookTitles->deleteLast());
5656

5757
$bookTitles->display();
58-
echo SEPERATOR;
58+
echo SEPARATOR;
5959

6060
// Search and delete a entry from the list.
6161
$bookTitles->delete("Introduction to PHP Data Structures");
6262

6363
$bookTitles->display();
64-
echo SEPERATOR;
64+
echo SEPARATOR;
6565

6666
// Reverse the list
6767
$bookTitles->reverse();
6868

6969
$bookTitles->display();
70-
echo SEPERATOR;
70+
echo SEPARATOR;
7171

7272
// Retrieve the 2nd item from the list
7373
echo $bookTitles->getItemByPosition(2)->data;
74-
echo SEPERATOR;
74+
echo SEPARATOR;
7575

7676
// We've made the list Iterable, reverse list again and loop through it.
7777
$bookTitles->reverse();

0 commit comments

Comments
 (0)