npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

data_structure_models

v1.0.3

Published

A NPM Package which provides access to various Data Structures in Javascript eliminating the purpose of coding them from scratch.

Downloads

9

Readme

Data-Structures

Introduction

Data Structures is an NPM Package built for Developers to get a High-Level API Access to various Data Structures. This is my first NPM Package and this tool was developed for practising various Data Structures and was later wrapped as a Package and published on NPM.

Installation

The Package can be installed by running the follow command on your Command Prompt/Shell:

$ npm install data_structure_models

After installation of the the Package, you can run the following script to validate if the Package is running fit and fine:

var dataStructureModels = require("data_structure_models");
var datastructures= new dataStructureModels();
var stack=datastructures.Stack();
stack.push(5);
stack.push(3);
stack.print();

This will print the Stack on the Console and you are free to experiment with the wide number of Data Structures available with the Package.

How to use the Package?

This Package has a lot of Data Structures which you can try out. Some of the Data Structures and their particular implementations have been listed below. We are taking the example of Binary Search Tree here. Binary search tree is a data structure that quickly allows us to maintain a sorted list of numbers.

To access Binary Search Trees, try out the following script:

var dataStructureModels = require("data_structure_models");
var datastructures= new dataStructureModels();
var bst=datastructures.BinarySerachTree();
bst.add(5);
bst.add(3);
bst.add(8);
console.log(bst.findMax())
// Output: 8

Besides these, other Data Structures that can be called and access using the package are:

  • Hash Table
  • Linked List
  • Priority Queue
  • Queue
  • Stack
  • Doubly Linked List
  • Queue using Linked List

LICENSE

ISC