deno.land / x / masx200_leetcode_test@10.6.5 / remove-duplicates-from-sorted-array-ii / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { assertEquals } from "../deps.ts";import removeDuplicates2 from "./index.ts";
Deno.test("remove-duplicates-from-sorted-array-ii", () => { const examples: { input: number[]; output: number[] }[] = [ { input: [1, 1, 1, 2, 2, 3], output: [1, 1, 2, 2, 3] }, { input: [0, 0, 1, 1, 1, 1, 2, 3, 3], output: [0, 0, 1, 1, 2, 3, 3] }, ]; examples.forEach(({ input, output }) => { const length = removeDuplicates2(input); assertEquals(input.slice(0, length), output); });});
masx200_leetcode_test

Version Info

Tagged at
a year ago