From 2ebeb4145ae7af8de17c0bd37a464a331c895795 Mon Sep 17 00:00:00 2001 From: amin Date: Fri, 5 Jul 2024 02:15:54 +0100 Subject: [PATCH] docs: adding detail for negative index edge case. --- subjects/java/checkpoints/circular-linkedlist/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/java/checkpoints/circular-linkedlist/README.md b/subjects/java/checkpoints/circular-linkedlist/README.md index d7b25629d..522ac835a 100644 --- a/subjects/java/checkpoints/circular-linkedlist/README.md +++ b/subjects/java/checkpoints/circular-linkedlist/README.md @@ -4,7 +4,7 @@ Create a circular single linked list data structure that implements the following methods: -- `at(int index)`: to access an element by its index. +- `at(int index)`: to access an element by its index. if the index is negative or if the list is empty 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 return the size of the list.