Hello, I need to create algorithm with O(n) complexity.
In the beginning the must be 2 inputs: n= number of elements in the array, and k = number of the nearest values to the median of the array.
Example : 1,15,6,7,8,9,2,19,11
(9/2) => 4 , do the 4. element of the array is 7=> is the median, so the nearest k number to the median is (6,8).
Can anyone please help me with this pls
LaTeX forum ⇒ Math & Science ⇒ Latex creating algorithm
Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests