mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
added a comment block like in #962.
This commit is contained in:
parent
406ad387db
commit
b631eee388
@ -1,5 +1,14 @@
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user