Skip to content

[FEATURE]: Searching & Sorting Algorithms #1835

@nidh-cyber

Description

@nidh-cyber

[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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions