repeated constraints removed.

This commit is contained in:
Sushil Kumar 2020-08-23 00:37:46 +05:30 committed by GitHub
parent 37b252697d
commit a1242904e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
* @cases from [here](https://brilliant.org/wiki/median-finding-algorithm/) * @cases from [here](https://brilliant.org/wiki/median-finding-algorithm/)
* *
* @details * @details
* Given an array A[1,...,n] of n numbers and an index idx, where 1idx n, 1idx n, find the i-th smallest element of A. * Given an array A[1,...,n] of n numbers and an index idx, where 1idx n, find the i-th smallest element of A.
* median_of_medians(A, i): * median_of_medians(A, i):
* #divide A into sublists of len 5 * #divide A into sublists of len 5
* sublists = [A[j:j+5] for j in range(0, len(A), 5)] * sublists = [A[j:j+5] for j in range(0, len(A), 5)]