[HAI] week3 intersection array
https://www.interviewbit.com/problems/intersection-of-sorted-arrays/
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { intersectionSortedArray } from "./intersectionSortedArray.ts";
|
||||
|
||||
describe("intersectionSortedArray", () => {
|
||||
|
||||
it("[1,2,3,3,4,5,6] [3,3,5] => [3,3,5]", () => {
|
||||
expect(intersectionSortedArray([1, 2, 3, 3, 4, 5, 6], [3, 3, 5])).toEqual([3, 3, 5]);
|
||||
});
|
||||
|
||||
it("[1,2,3,4,5,6] [3,5] => [3,5]", () => {
|
||||
expect(intersectionSortedArray([1, 2, 3, 4, 5, 6], [3, 5])).toEqual([3, 5]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user