Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
/ linkedlist Public archive

A doubly linked list (Bi-directional) implementation.

License

Notifications You must be signed in to change notification settings

dmpjs/linkedlist

Repository files navigation

Linklist

A Deno port of x3-linkedlist

A doubly linked list (Bi-directional) implementation

What is a linked list

A linked list is a common data structure made of a chain of nodes in which each node contains a value and a pointer to the next node in the chain.

The head pointer points to the head node, and the tail element of the list points to null. When the list is empty, the head pointer points to null.

Installation

Run

import { LinkedList, LinkedListItem } from "https://raw.githubusercontent.com/dmpjs/linkedlist/v1.1.2/mod.ts import from github as raw data

import { LinkedList, LinkedListItem } from "https://deno.land/x/linkedlist@v1.1.2/mod.ts If module is uploaded into deno.land

Usage

import { LinkedList } from "https://raw.githubusercontent.com/dmpjs/linkedlist/v1.1.2/mod.ts

const list = new LinkedList([1, 2, 3, 4]);

console.log("content:", list.join(" -> "));

Test

Run

$ deno test test.ts

To run all tests.

Versioning

This library follows semantic versioning, and additions to the code ruleset are performed in major releases.

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.