import { describe, it, expect } from "vitest";
import { twoSumHashTable } from "./twoSumHashTable.ts";

describe("twoSumHashTable", () => {

  it("[2,7,11,15], 9 => [0, 1]", () => {
    expect(twoSumHashTable([2, 7, 11, 15], 9)).toEqual([0, 1]);
  });

  it("[3,2,4], 6 => [1, 2]", () => {
    expect(twoSumHashTable([3, 2, 4], 6)).toEqual([1, 2]);
  });

  it("[3, 3], 6 => [0, 1]", () => {
    expect(twoSumHashTable([3, 3], 6)).toEqual([0, 1]);
  });

});
