From 12042b975864962de939480dd75f49a084d01167 Mon Sep 17 00:00:00 2001 From: zanninso Date: Thu, 4 Jul 2024 17:28:38 +0100 Subject: [PATCH] docs: add more details and fix formatting --- subjects/java/checkpoints/single-linkedlist/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subjects/java/checkpoints/single-linkedlist/README.md b/subjects/java/checkpoints/single-linkedlist/README.md index 0d8a0f0e7..aa2a851c1 100644 --- a/subjects/java/checkpoints/single-linkedlist/README.md +++ b/subjects/java/checkpoints/single-linkedlist/README.md @@ -7,9 +7,9 @@ Create a single linked list data structure that implements the following methods - `at(int index)`: to access an element by its index, if the index is out of bound return -1. - `add(int value)`: to add an element at the end of the list. - `remove(int index)`: to remove an element by its index. -- `size()`: to get theh size of the list. +- `size()`: to get the size of the list. -Define these methods in an interface called `LinkedList`, and implement this interface in a class that you will create. Additionally, add a private method `next(Node node)` in your class that will be used to traversing the list in the other methods. This method should print the message "Go to next node" each time it is called. +Define these methods in an interface called `LinkedList`, and implement this interface in a class called `SingleLinkedList`. Additionally, add a private method `next(Node node)` in this class that will be used to traversing the list in the other methods. This method should print the message "Go to next node\n" each time it is called. ### Explanation @@ -76,7 +76,7 @@ public class SingleLinkedList implements LinkedList { ### Usage -Here is a possible ExerciseRunner.java to test your class: +Here is a possible `ExerciseRunner.java` to test your class: ```java public class ExerciseRunner {