palsubho801-create/Beginner-Tasks-Repo

Implement a Binary Search Function in C

开放

#23 创建于 2025年10月16日

 (2 条评论) (0 个反应) (0 位负责人)C (4 个派生)auto 404
hacktoberfest

仓库指标

星标
 (0 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南