It is quite easy to visualize this statement since the median which we report will be (k/2)th element and if we take k/2 elements from the left quarter.
design analysis and algorithm
3 Articles
3
Analysis of Loops – Analysis of Algorithm – O(1): Time complexity of a function (or set of statements) is considered as O(1) if it doesn’t contain Analysis.
Time Complexity where loop variable is incremented by 1, 2, 3, 4 – Analysis of Algorithm – What is the time complexity of below code?The loop variable ‘i’