A linked list program, originally based on an example from Computerphile, written in Groovy.
The program accepts strings of letters and numbers (starting with a letter) or integers and will add them to a sorted linked list. Prefixing an input with a tilde (~
) will instead attempt to remove one matching entry from the linked list if it exists. Inputting the strings "l"
, "i"
, "a"
, "r"
, "f"
or "b"
will print the items currently in the linked list using a looping, iterative, array-based, recursive, fold or foldback method (if possible in the language).
In practice, the license on any code I write means very little, but for those who want a some semblance of formality, let it be stated that all code is available under the MIT License.