deno.land / x / masx200_leetcode_test@10.6.5 / move-zeroes / 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 move_zeros from "./index.ts";
Deno.test("move_zeros", () => { const examples: { input: Parameters<typeof move_zeros>[0]; output: Parameters<typeof move_zeros>[0]; }[] = [ { input: [0, 1, 0, 3, 12], output: [1, 3, 12, 0, 0], }, { input: [0], output: [0] }, { input: [999, 999, 99, 9], output: [999, 999, 99, 9] }, ]; examples.forEach(({ input, output }) => { move_zeros(input); assertEquals(output, input); });});
masx200_leetcode_test

Version Info

Tagged at
a year ago