JavaScript icon indicating copy to clipboard operation
JavaScript copied to clipboard

[FEATURE]: Searching & Sorting Algorithms

Open nidh-cyber opened this issue 3 months ago • 4 comments

[New Feature] Searching and Sorting Algorithms

  • Added reference implementations for searching (linear, binary) and sorting (bubble, quicksort, merge sort) algorithms.
  • Useful for interview prep and algorithmic learning.

#[Sample] JS Algorithm (Binary Search):

function binarySearch(arr, target) { let left = 0, right = arr.length - 1; while (left <= right) { const mid = Math.floor((left + right) / 2); if (arr[mid] === target) return mid; if (arr[mid] < target) left = mid + 1; else right = mid - 1; } return -1; }

nidh-cyber avatar Oct 11 '25 17:10 nidh-cyber

Can you please assign this issue to me? I am a second year MTech student from DAIICT.

vrajkmrpatel avatar Oct 15 '25 17:10 vrajkmrpatel

Hello,I'd like to contribute a fix for the binary search implementation.

nike750 avatar Oct 17 '25 09:10 nike750

Hi @nidh-cyber šŸ‘‹

I noticed that the repository already includes a comprehensive set of searching and sorting algorithms such as BinarySearch.js, LinearSearch.js, MergeSort.js, QuickSort.js, BubbleSort.js, etc.

Could you please clarify whether this issue (#1835) aims to:

  1. Add new algorithms not yet included, or
  2. Refactor / modernize / add tests or docs for the existing ones?

I’d be happy to contribute accordingly once I know the specific scope.

Thanks! — Sahil Maurya

sm-28601 avatar Oct 19 '25 08:10 sm-28601

@nidh-cyber it is already their in the search folder you don't to be worry for this

Stackashu avatar Nov 22 '25 17:11 Stackashu