未验证 提交 b631eee3 编写于 作者: S Sushil Kumar 提交者: GitHub

added a comment block like in #962.

上级 406ad387
// Given an array A[1,...,n] of n numbers and an index idx, idx, where 1≤idx≤ n, 1≤idx≤ n, find the i-th smallest element of A.
/**
* @file median_search.cpp
* @brief Implementation of [Median search](https://en.wikipedia.org/wiki/Median_search) algorithm.
* @cases from [here](https://brilliant.org/wiki/median-finding-algorithm/)
*
* @details
* Given an array A[1,...,n] of n numbers and an index idx, idx, where 1≤idx≤ n, 1≤idx≤ n, find the i-th smallest element of A.
* \note this algorithm implements median search for only arrays which have distinct elements
*
* @author [Sushil Kumar](https://github.com/Rp-sushil)
*/
#include <iostream>
#include <algorithm>
#include <vector>
......@@ -12,7 +21,6 @@ namespace search {
/**
* @namespace median_search
* @brief Functions for [Median search](https://en.wikipedia.org/wiki/Median_search) algorithm
* @cases from [here](https://brilliant.org/wiki/median-finding-algorithm/)
*/
namespace median_search {
/* Assume that all the elements of A are distinct
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册