1.0.6 • Published 8 months ago

vbhvtrpthi.js v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Vaibhav-DSA Package in JS

A Data Structures and Algorithms library for NodeJS

Bad programmers worry about the code. Good programmers worry about data structures and algorithms.

This package contains templates for the following Data Structures and Algorithms:

1. Data Structures

  • Heap
  • Queue

2. Algorithms

  • Binary Search
  • Bubble Sort
  • Merge Sort
  • Quick Sort

How to use the Algorithms package?

// import the package
const dsa = require("vbhvtrpthi.js"); 

const arr = [7, 3, 1, 5, 8, 9, 0, 2]; 

// call the inbuilt sort function
dsa.Algorithms.BubbleSort(arr); 

console.log(arr);

How to use the Data-Structures package?

// import the package
const dsa = require("vbhvtrpthi.js");

// creating an object of the PriorityQueue and inserting the elements using inbuilt function
const pq = new dsa.DataStructures.PriorityQueue((a, b) => a> b);

pq.insert(9);
pq.insert(8);
pq.insert(1);
pq.insert(9);
pq.insert(5);
pq.insert(4);

pq.display();
1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago