Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-footstone

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-footstone

data structure

  • 0.1.21
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68
increased by51.11%
Maintainers
1
Weekly downloads
 
Created
Source

data-footstone

overview

使用 ts 编写基本的数据结构。
0.1.x-版本中 api 变动较大,使用时请锁定版本号。

feature

  • stack
  • queue
    • PriorityQueue
  • chain
    • SingleChain
    • DoublyChain
    • SingleCircleChain
    • DoublyCircleChain
  • hashMap
    • hash 方法
  • tree
    • BinaryTree
    • BinarySearchTree
    • AVLTree
  • graph
    • DirectionGraph
    • UndirectionGraph
  • sort
  • cache
    • fifo
    • lru
    • lfu

install

npm i data-footstone

usage

import { Stack } from 'data-footstone'
let s = new Stack()
s.push(1) // 压入栈
s.push(2)
s.push(3)
s.push(4)
s.toArray() // [1,2,3,4]
s.pop() // 4 弹出栈顶元素
s.pop() // 3
s.peek() // 2 返回栈顶元素
s.isEmpty() // false 是否空栈
s.clear() // 清空栈

api

详见官网

Keywords

FAQs

Package last updated on 21 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc