UNPKG

@sridhar-mani/dsa-js

Version:

A full-fledged data structure library with linked list and double linked list implementation

36 lines (25 loc) • 1.2 kB
# šŸ“¦ JS-DSA (Linked List Library) A **TypeScript-based Linked List implementation** for both frontend and backend use. This library provides an easy-to-use **singly linked list** with common operations like insertion, deletion, search, and traversal. ## šŸš€ Features - āœ… **Append & Prepend** elements efficiently - āœ… **Insert** at any index - āœ… **Delete** elements or nodes - āœ… **Find** elements by value or condition - āœ… **Reverse** the linked list - āœ… **Convert to/from arrays** - āœ… **String representation** of linked list - āœ… **Delete Head** of linked list - āœ… **Delete Tail** of linked list - āœ… **Clear** all nodes of the list --- ## šŸ“– What is a Linked List? A **linked list** is a data structure consisting of **nodes**, where each node contains: 1. A **value** 2. A **pointer (reference) to the next node** in the list Unlike arrays, **linked lists do not require contiguous memory allocation**, making insertion and deletion more efficient in many cases. šŸ“ŗ **Visualize Linked Lists Here**: [Visualgo.net](https://visualgo.net/en/list) --- ## šŸ“¦ Installation ### **Using npm** ```sh npm install @sridhar-mani/js-dsa