[HAI] twoSumHashtable
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { twoSumHashTable } from "./twoSumHashTable.ts";
|
||||
|
||||
describe("twoSumHashTable", () => {
|
||||
let sortedArray = [-12, 1, 4, 6, 22];
|
||||
|
||||
it("twoSumHashTable", () => {
|
||||
expect(twoSumHashTable(sortedArray, 4)).toBe(2);
|
||||
});
|
||||
|
||||
it("twoSumHashTable", () => {
|
||||
expect(twoSumHashTable(sortedArray, 3)).toBe(-1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user