Minimal TypeScript project implementing a 3-way merge function.
Function: merge(collection_1, collection_2, collection_3): number[]
- collection_1 and collection_2: sorted ascending (min -> max)
- collection_3: sorted descending (max -> min)
- returns a single array sorted ascending, without using any sort function.
Setup
-
Cloning files and changing into project's directory
-
Install dependencies
npm install- Run tests
npm testFiles
src/merge.ts- implementationtest/merge.spec.ts- Vitest unit tests