@jsdsl/doubly-linked-list
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.0 • Public • Published

    JSDSL - Doubly Linked List

    A full-featured doubly-linked list implementation.

    Find @jsdsl/doubly-linked-list on NPM.

    Table of Contents

    Installation

    Install from NPM with

    $ npm install --save @jsdsl/doubly-linked-list
    

    Basic Usage

    A basic use case would be as follows:

    import { DoublyLinkedList, DoublyLinkedListNode } from "@jsdsl/doubly-linked-list";
     
    // Initialize the doubly-linked list.
    let dll: DoublyLinkedList<string> = new DoublyLinkedList<string>();
     
    // Add an element: 'turtle'
    dll.add("turtle");
     
    // Add at element at the beginning of the list.
    let catNode: DoublyLinkedListNode<E> = dll.insertFirst("cat");
     
    // Insert an element, 'dog', after the 'cat' element.
    dll.insertAfter("dog", catNode);
     
    // The list's current state:
    // 'cat' <--> 'dog' <--> 'turtle'

    Documentation

    See the wiki for full documentation.

    License

    @jsdsl/doubly-linked-list is made available under the GNU General Public License v3.

    Copyright (C) 2019 Trevor Sears

    Install

    npm i @jsdsl/doubly-linked-list

    DownloadsWeekly Downloads

    4

    Version

    0.3.0

    License

    GPL-3.0-or-later

    Unpacked Size

    111 kB

    Total Files

    23

    Last publish

    Collaborators

    • t99