select.html

来自「数据结构词典(英文)」· HTML 代码 · 共 46 行

HTML
46
字号
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>Select</TITLE>
<META name="description"
  content="Definition of Select,
	possibly with links to more information and implementations.">
<META name="keywords" content="Select">
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H1>Select</H1>
<P>
(algorithm)

<P>
<strong>Definition:</strong>
A four-part algorithm to <a href="selectkth.html" tppabs="http://hissa.nist.gov/dads/HTML/selectkth.html"><em>select k<sup>th</sup> element</em></a> of an <a href="array.html" tppabs="http://hissa.nist.gov/dads/HTML/array.html"><em>array</em></a>.  Part 1) Consider the array as groups of 5 elements, and sort and find the <a href="median.html" tppabs="http://hissa.nist.gov/dads/HTML/median.html"><em>median</em></a> of each group.  2) Use Select  <a href="recursion.html" tppabs="http://hissa.nist.gov/dads/HTML/recursion.html"><em>recursively</em></a> to find <em>x</em>, the median of the medians. 3) Next <a href="partition.html" tppabs="http://hissa.nist.gov/dads/HTML/partition.html"><em>partition</em></a> the array around <em>x</em>.   4) Let i be the number of elements in the low side of the partition.  If k  <img src="leq.gif" tppabs="http://hissa.nist.gov/dads/HTML/Images/leq.gif" border=0 height=7  width=14 alt="less than or equal to"> i, use Select recursively to find the k<sup>th</sup> element of the low side.  Otherwise use Select to find the k-i<sup>th</sup> element of the high side.
<P><em>Note:
After [CLR, p 190].</em>
<P>Author: <a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</a>

<hr>

Go to the
<A HREF="terms.html" tppabs="http://hissa.nist.gov/dads/terms.html">Algorithms, Data Structures, and Problems</A>
home page.

<hr>

If you have suggestions, corrections, or comments, please get in touch
with
<a href="javascript:if(confirm('http://hissa.nist.gov/~black/black.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://hissa.nist.gov/~black/black.html'" tppabs="http://hissa.nist.gov/~black/black.html">Paul E. Black</a>
&nbsp;(<a href="mailto:paul.black@nist.gov">paul.black@nist.gov</a>).

<p>
Entry modified Fri Jan 14 15:21:33 2000.<BR>
HTML page formatted Thu Jan 20 16:36:30 2000.

<P>
This page's URL is
<A href="select.html" tppabs="http://hissa.nist.gov/dads/HTML/select.html">http://hissa.nist.gov/dads/HTML/select.html</A>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?