deno.land / std@0.224.0 / data_structures / mod.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
/** * Data structures for use in algorithms and other data manipulation. * * ```ts * import { BinarySearchTree } from "https://deno.land/std@$STD_VERSION/data_structures/mod.ts"; * * const values = [3, 10, 13, 4, 6, 7, 1, 14]; * const tree = new BinarySearchTree<number>(); * values.forEach((value) => tree.insert(value)); * * [...tree]; // [ 1, 3, 4, 6, 7, 10, 13, 14 ] * tree.min(); // 1 * tree.max(); // 14 * tree.find(42); // null * tree.find(7); // 7 * tree.remove(42); // false * tree.remove(7); // true * [...tree]; // [ 1, 3, 4, 6, 10, 13, 14 ] * ``` * * @module */
export * from "./binary_heap.ts";export * from "./binary_search_tree.ts";export * from "./comparators.ts";export * from "./red_black_tree.ts";
std

Version Info

Tagged at
3 weeks ago