A linked list program, originally based on an example from Computerphile, written in multiple languages for the purpose of introducing myself to them.
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).
Although many of these methods for printing the contents of the linked list are non-standard, or at least unwieldy, in the different languages, they have been implemented where possible. Techniques such as using pointers to pointers, references and closures are employed where suitable.
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.