# @dustinleethomas/structs

> playing around with NPM and creating a simple data structure library

Latest version **2.4.2** (published 2023-03-07) · GNU General Public License license · 0 weekly downloads

## Install

```sh
npm install @dustinleethomas/structs
pnpm add @dustinleethomas/structs
yarn add @dustinleethomas/structs
bun add @dustinleethomas/structs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.2 |
| Published | 2023-03-07 |
| First published | 2023-02-17 |
| Weekly downloads | 0 |
| License | GNU General Public License |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 40.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dustinleethomas |
| Keywords | heap, graph |

## Links

- npm: https://www.npmjs.com/package/@dustinleethomas/structs
- Repository: https://github.com/dthomas314/structs
- Homepage: https://github.com/dthomas314/structs#readme
- Issues: https://github.com/dthomas314/structs/issues
- npm.io page: https://npm.io/package/@dustinleethomas/structs

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.4.2 (latest) — 2023-03-07
- 2.4.1 — 2023-03-03
- 2.3.1 — 2023-02-28
- 2.3.0 — 2023-02-17
- 2.2.0 — 2023-02-17
- 2.1.0 — 2023-02-17
- 2.0.0 — 2023-02-17
- 1.0.0 — 2023-02-17

## README

# @dthomas314/structs
structs library for npm package

(https://github.com/dthomas314/structs)


**Install**

$ npm install @dustinleethomas/structs



**Usage**
```
const MinHeap = require("@dustinleethomas/structs/MinHeap");

let testArray = [1, 4, 2, 7];
let myHeap = new MinHeap();

for(const elem of testArray) {
    myHeap.insert(elem);
}

myHeap.print();
console.log(myHeap.remove());
myHeap.print();
console.log(myHeap.remove());
myHeap.print();
console.log(myHeap.remove());
myHeap.print();
console.log(myHeap.remove());
myHeap.print();
console.log(myHeap.remove());
myHeap.print();
```

```
const Graph = require("@dustinleethomas/structs/Graph");

let myGraph = new Graph(6);

myGraph.addVertex('A');
myGraph.addVertex('B');
myGraph.addVertex('C');
myGraph.addVertex('D');
myGraph.addVertex('E');
myGraph.addVertex('F');

myGraph.addEdge('A', 'B');
myGraph.addEdge('A', 'D');
myGraph.addEdge('A', 'E');
myGraph.addEdge('B', 'C');
myGraph.addEdge('D', 'E');
myGraph.addEdge('E', 'F');
myGraph.addEdge('E', 'C');
myGraph.addEdge('C', 'F');

myGraph.print();

console.log('BFS');
myGraph.bfs('A');

console.log('DFS');
myGraph.dfs('A');
```

---
_Source: https://npm.io/package/@dustinleethomas/structs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
