1

The LinkedList data structure tends to have different methods of implementation, even when coded in the same language.

Is there a fundamental specification for what a LinkedList must have somewhere? Sort of like the ECMA standard for JavaScript but for a LinkedList data structure (as well as others).

Hays Stanford
  • 93
  • 1
  • 8
  • Does this answer your question? [Standard implementation of a linked list in C](https://stackoverflow.com/questions/9707745/standard-implementation-of-a-linked-list-in-c) – EmptyCup Jan 29 '20 at 14:48

1 Answers1

0

If you are asking for the methods a LinkedList data structure should expose in an OOP language, then it comes under the Collections interface of Java, or C# for example. At a very high level, it should expose methods like:

  1. Create a new list of a given data type (i.e. template)
  2. Add element/node to the list
  3. Delete element/node from list
  4. Get the next element/node of a given element/node so that you can interate over the list.

These are the bare minimum ones to operate with this data structure. Collections interface will declare more methods which are useful in high level languages.