palsubho801-create/Beginner-Tasks-Repo

Implement a Binary Search Function in C

Offen

#23 geöffnet am 16.10.2025

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C (4 Forks)auto 404
hacktoberfest

Repository-Metriken

Stars
 (0 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Create a new file named 'binary_search.c' that implements the Binary Search algorithm.

Requirements:

  1. The function must assume the input array is already sorted.
  2. It should return the index of the target element if found, or -1 otherwise.
  3. Include a main function to test the search on a hardcoded sorted array.

Contributor Guide