JavaScript Algorithm Exercises

This repository contains a set of exercises designed to test and improve your algorithmic thinking and JavaScript programming skills.

Table of Contents


mergeArrays

Merge two sorted arrays into a single, sorted array.

binarySearch

Implement a binary search algorithm.

removeDuplicates

Remove all duplicate values from an array.

union

Find the union of two arrays.

mergeAndRemoveDuplicates

Merge two arrays into one and remove all duplicate values.

mergeKSortedArrays

Given k sorted arrays, merge them into a single sorted array.

linearSearch

Implement a linear search algorithm.

findDuplicates

Find all duplicate values shared by two arrays.

frequencyCounter

Count the frequency of each value in an array.

arrayPairSum

Given an array of integers and a target number, find all pairs of integers in the array that sum up to the target.

intersection

Find the intersection of two arrays.

Getting Started

  1. Clone the repository and navigate into it:
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
  1. Install dependencies (if any):
npm install

  1. Run tests (if any):
npx jest test

  1. Open in your favorite IDE and start coding!

Happy Coding!