@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
Markdown
# š¦ 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