deno.land / x / masx200_leetcode_test@10.6.5 / design-skiplist / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { assertEquals } from "asserts";
import Skiplist from "./index.ts";
Deno.test("design-skiplist", () => { const skiplist: Skiplist = Skiplist(); skiplist.add(1); skiplist.add(2); skiplist.add(3); assertEquals(false, skiplist.search(0)); // 返回 false skiplist.add(4); assertEquals(true, skiplist.search(1)); // 返回 true assertEquals(false, skiplist.erase(0)); // 返回 false,0 不在跳表中 assertEquals(true, skiplist.erase(1)); // 返回 true assertEquals(false, skiplist.search(1)); // 返回 false,1 已被擦除});
masx200_leetcode_test
leetcode题解和一些测试工具
DocumentationDocumentation
GitHub Repositorymasx200/leetcode-test
GitHub Stars
4

Version Info

Tagged at
4 months ago