Ciyeblog - 利用stl中nth_element()找出第k小的数字 的评论 找出一个数组中第k小的数 一、朴素做法 sort() 时间复杂度:O(nlogn) 二、利用STL库函数nth_element() 时间复杂度:O(n) 用法:`nth_element(a... 1970-01-01T08:00:00+08:00 Typecho https://www.ciyekua.cn/index.php/feed/atom/diary/152.html