Coder Social home page Coder Social logo

isaac-svg / dsa-native Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 659 KB

Blazingly Fast Open Source (NPM) Native Data Structures and Algorithms

Home Page: https://www.npmjs.com/package/dsa-native

License: MIT License

Python 15.64% Makefile 30.99% JavaScript 12.83% C++ 40.26% C 0.28%
nodejs cpp makefile napi node-gyp v8-javascript-engine yeoman

dsa-native's Introduction

dsa-native: Native Data Structures and Algorithms

Unleash the power of native JavaScript for efficient data manipulation and problem-solving.

Overview

dsa-native is an npm package providing native implementations of various data structures and algorithms in C++. This package offers efficient and performant implementations of commonly used data structures and algorithms for JavaScript applications, giving developers access to optimized code for handling complex data operations.

Key Features

  • Native Performance: Maximize speed and efficiency by avoiding external dependencies and fully utilizing JavaScript's native features.
  • Foundational Data Structures: Access a variety of essential data structures, including:
    • VectorList
    • LinkedList
    • Stack
    • Queue
  • Sorting Algorithm: Implement the widely used quickSort algorithm for efficient data organization.
  • Open to Contributions: Help expand the library's functionality and contribute to its growth!

Installation

Install the package using npm:

npm install dsa-native
const {
  VectorList,
  LinkedList,
  Stack,
  Queue,
  quickSort,
  quickSortAsync,
} = require("dsa-native");

// Usage examples will be available once the methods are fully implemented.

// VectorList example
const vectorList = new VectorList();
// Perform operations with VectorList methods

// LinkedList example
const linkedList = new LinkedList();
// Perform operations with LinkedList methods

// Stack example
const stack = new Stack([]);
// Perform operations with Stack methods

// Queue example
const queue = new Queue();
// Perform operations with Queue methods

// quickSort example
const arr = [2, 1, 3, 4, 1, 2, "34", 1, "213", 2222, 34, 5, 6, "7", 8, 0];
// asynchronous method
quicksortAsync(arr).then((data) => console.log(data));
// synchronous method
const result = quickSort(arr);

// Merge sort
// Merge sort methods usage will be shown once implemented
Algorithm Name Input Size Time Taken by Native Code (seconds) Time Taken by JS Implementation (seconds)
QuickSort 10,000,000 4.877 7.377

Available Data Structures and Algorithms

Data Structures:

  • VectorList: A vector based implementation of a linkedlist.
  • LinkedList: A linear collection of nodes, providing flexibility in insertion and deletion.
  • Stack: A LIFO (Last-In-First-Out) data structure for managing ordered operations.
  • Queue: A FIFO (First-In-First-Out) data structure for handling sequential tasks.

Algorithm:

  • quickSort: A divide-and-conquer sorting algorithm known for its efficiency.

Contributing

dsa-native is open to contributions. You can contribute by implementing methods, fixing bugs, improving documentation, or suggesting enhancements. Please follow the guidelines in the CONTRIBUTING.md file.

Documentation in Progress

Detailed documentation for individual data structures and algorithms is currently under development. Stay tuned for updates!

dsa-native's People

Contributors

isaac-svg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.