@ffflorian/doublelinkedlist

3.6.2 • Public • Published

double-linked-list License: GPL v3 npm version

A linked list in which every element knows about its predecessor and its successor.

 ______     ______     ______
| |  | |   | |  | |   | |  | |
| |  | <---> |  | <---> |  | |
|_|__|_|   |_|__|_|   |_|__|_|
  prev        n         next

Prerequisites

Installation

ℹ️ This is a pure ESM module.

Run yarn add @ffflorian/doublelinkedlist or npm i @ffflorian/doublelinkedlist.

Usage

import {LinkedList} from '@ffflorian/doublelinkedlist';

const list = new LinkedList();
list.add('one');
list.add('two');
list.add('three');
list.get(0); // 'one'

The full API documentation is available at https://ffflorian.github.io/DoubleLinkedList.

Testing

First, install the needed packages for testing:

yarn

Now run the tests:

yarn test

Readme

Keywords

none

Package Sidebar

Install

npm i @ffflorian/doublelinkedlist

Weekly Downloads

2

Version

3.6.2

License

GPL-3.0

Unpacked Size

63.1 kB

Total Files

11

Last publish

Collaborators

  • ffflorian