Random commentary about Machine Learning, BigData, Spark, Deep Learning, C++, STL, Boost, Perl, Python, Algorithms, Problem Solving and Web Search
Simple Algorithm: Walk thru' the list keeping track of smallest and second smallest numbers... Runs in O(n) time. A second alternative is use Median Of Median algorithm that guarantees the ability to return kth smallest element in O(n).
Tournament Alog
Tournament Alogrithm
Simple Algorithm: Walk thru' the list keeping track of smallest and second smallest numbers... Runs in O(n) time.
ReplyDeleteA second alternative is use Median Of Median algorithm that guarantees the ability to return kth smallest element in O(n).
Tournament Alog
ReplyDeleteTournament Alogrithm
ReplyDelete