deno.land / x / masx200_leetcode_test@10.6.5 / minimum-number-of-refueling-stops / 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 minRefuelStops from "./index.ts";
Deno.test("minimum-number-of-refueling-stops", () => { const target = 1; const startFuel = 1; const stations: number[][] = []; const ans = 0; assertEquals(minRefuelStops(target, startFuel, stations), ans); assertEquals(minRefuelStops(100, 1, [[10, 100]]), -1); assertEquals( minRefuelStops(100, 10, [ [10, 60], [20, 30], [30, 30], [60, 40], ]), 2, );});
masx200_leetcode_test

Version Info

Tagged at
a year ago