mirror of https://github.com/01-edu/public.git
docs: adding detail for negative index edge case.
This commit is contained in:
parent
cfc77d160f
commit
2ebeb4145a
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
Create a circular single linked list data structure that implements the following methods:
|
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.
|
- `add(int value)`: to add an element at the end of the list.
|
||||||
- `remove(int index)`: to remove an element by its index.
|
- `remove(int index)`: to remove an element by its index.
|
||||||
- `size()`: to return the size of the list.
|
- `size()`: to return the size of the list.
|
||||||
|
|
Loading…
Reference in New Issue