今天猛然间看到 pivot可以这样优化:取开始(beg)、中间(mid)、结束(end)的中间值

用我讨厌的数学公式表达就是 pivot=intermediate{beg,mid,end}

小小优化,小小优化,高手无视之~~~

Update :我刚写完上面的废话  KC就发博文了,讲得详细的多,推广一下http://blog.kingsamchen.cn/archives/302

Tags: ,,. 3,485 views
Home

2 Comments so far

Trackbacks/Pingbacks

Leave a comment

Name(required)
Mail (required),(will not be published)
Website(recommended)

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
URLs must be fully qualified (eg: http://blog.nlogn.cn),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.