
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
datastructures-algorithms-ts
Advanced tools

一种遵从后进先出(LIFO)原则的有序集合。新添加或待删除的元素都保存在栈的同一端,称作栈顶,另一端就叫栈底。在栈里,新元素都靠近栈顶,旧元素都接近栈底。
import { Stack } from 'datastructures-algorithms-ts'
const stack = new Stac<number>k()
stack.push(...[1,2,3])
stack.push(4)
普通队列是遵循先进先出(FIFO,也称为先来先服务)原则的一组有序的项。队列在尾部添加新元素,并从顶部移除元素。最新添加的元素必须排在队列的末尾。
import { Queue } from 'datastructures-algorithms-ts'
const queue = new Queue<number>()
queue.enqueue(...[1,2,3])
queue.enqueue(4)
双端队列(deque,或称 double-ended queue)是一种允许我们同时从前端和后端添加和移除元素的特殊队列。
import { Queue } from 'datastructures-algorithms-ts'
const queue = new Queue<number>()
queue.enqueue(...[1,2,3])
queue.enqueue(4)
链表存储有序的元素集合,但不同于数组,链表中的元素在内存中并不是连续放置的。每个元素由一个存储元素本身的节点和一个指向下一个元素的引用(也称指针或链接)组成。
import { LinkedList } from 'datastructures-algorithms-ts'
const list = new LinkedList<number>()
list.push(1)
冒泡排序比较所有相邻的两个项,如果第一个比第二个大,则交换它们。元素项向上移动至正确的顺序,就好像气泡升至表面一样,冒泡排序因此得名。
import { bubbleSort } from 'datastructures-algorithms-ts'
bubbleSort<number>([1,2,3], (a, b) => { Math.random() > 0.5 ? 1 : -1 }
FAQs
常用的数据结构与算法typescript实现
We found that datastructures-algorithms-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.