⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insertsrt.html

📁 数据结构词典(英文)
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>insertion sort</TITLE>
<META name="description"
  content="Definition of insertion sort,
	possibly with links to more information and implementations.">
<META name="keywords" content="insertion sort">
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H1>insertion sort</H1>
<P>
(algorithm)

<P>
<strong>Definition:</strong>
An algorithm which orders items by repeatedly taking the next item and inserting it into the final data structure in its proper order with respect to items already inserted.  Run time is <a href="bigOnotation.html" tppabs="http://hissa.nist.gov/dads/HTML/bigOnotation.html"><em>O(n<sup>2</sup>)</em></a>.
<P><em>Note:
Sorting can be done <a href="inplacesort.html" tppabs="http://hissa.nist.gov/dads/HTML/inplacesort.html"><em>in place</em></a> by taking the next item past the end of the sorted items, finding where the item should be inserted, opening a space there by moving following items forward (into the opening at the end where the item was removed), then putting the item in the open space.  Use <a href="binarysrch.html" tppabs="http://hissa.nist.gov/dads/HTML/binarysrch.html"><em>binary search</em></a> to reduce the number of comparisons needed to find where the item should be inserted.</em>
<P>Author: <a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</a>
<H2>Implementation</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/InsertionSortAlgorithm.java  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/InsertionSortAlgorithm.java'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/InsertionSortAlgorithm.java">(Java)</A>.
<H2>More information</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html">demonstration</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 Thu Jan 20 16:35:51 2000.<BR>
HTML page formatted Thu Jan 20 16:53:30 2000.

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

</BODY>
</HTML>

⌨️ 快捷键说明

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