项目作者: n20084753

项目描述 :
A standard template library for javascript
高级语言: JavaScript
项目地址: git://github.com/n20084753/STL.js.git
创建时间: 2018-08-13T18:33:41Z
项目社区:https://github.com/n20084753/STL.js

开源协议:

下载


STL.js

A standard template library for javascript

INSTALLATION

  1. git clone https://github.com/n20084753/STL.js

or
Download the source

  1. cd STL.js
  2. npm install
  3. npm start
  4. # Webpack dev server will run and opens the app on the browser with HRM,
  5. npm run build
  6. # Compiles the app for production and all compiled files lies on dist dir.
  7. # To deploy an the application simply transfer the dist to a web server's public directory.

The data structures in STL.js

Linked List

  • push
  • pushBack
  • pop
  • popBack
  • begin
  • end
  • size
  • empty
  • find
  • reverse

Stack

  • push
  • pop
  • peek
  • size
  • empty

Queue

  • enqueue
  • dequeue
  • size
  • empty

Set

  • add
  • remove
  • has
  • clear
  • empty
  • toArray
  • union
  • intersection
  • difference
  • isSubset

Dictionary

  • set
  • get
  • remove
  • hasKey
  • size
  • isEmpty
  • clear
  • keys
  • values
  • keyValues
  • toStirng

HashTable

  • put
  • get
  • remove
  • hashCode
  • size
  • isEmpty
  • clear
  • toStirng

BinarySearchTree

  • insert
  • remove
  • search
  • min
  • max
  • inOrder
  • preOrder
  • postOrder

AVLTree

  • insert
  • remove
  • search
  • min
  • max
  • inOrder
  • preOrder
  • postOrder

RedBlackTree

  • insert
  • search
  • min
  • max
  • inOrder
  • preOrder
  • postOrder