deno.land / x / masx200_leetcode_test@10.6.5 / merge-sorted-array / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { assertEquals } from "../deps.ts";import merge_Sorted_Array from "./index.ts";
Deno.test("merge-sorted-array", () => { const examples: { input: Parameters<typeof merge_Sorted_Array>; output: Parameters<typeof merge_Sorted_Array>[0]; }[] = [ { input: [[1, 2, 3, 0, 0, 0], 3, [2, 5, 6], 3], output: [1, 2, 2, 3, 5, 6], }, { input: [[1], 1, [], 0], output: [1] }, { input: [[0], 0, [1], 1], output: [1] }, ]; examples.forEach(({ input, output }) => { merge_Sorted_Array(...input); assertEquals(output, input[0]); });});
masx200_leetcode_test

Version Info

Tagged at
a year ago