正在加载图片...
Note: A program is written in some programming language, and does not have to be finite(e.g. an operation system). An algorithm can be described by human languages, flow charts, some programming languages, or pseudo code I Example] Selection Sort: Sort a set of n> 1 integers in increasing order. From those integers that are currently unsorted, find the smallest and place it next in the sorted list. for (i=0; i<n; i++)t Examine list[i to list[n-1]and suppose that the smallest integer is at list[min]; Interchange list[ and list(min]; Sort= Find the smallest integer Interchange it with list[iNote: A program is written in some programming language, and does not have to be finite (e.g. an operation system). An algorithm can be described by human languages, flow charts, some programming languages, or pseudo￾code. 〖Example〗 Selection Sort: Sort a set of n  1 integers in increasing order. From those integers that are currently unsorted, find the smallest and place it next in the sorted list. for ( i = 0; i < n; i++) { Examine list[i] to list[n−1] and suppose that the smallest integer is at list[min]; Interchange list[i] and list[min]; } Sort = Find the smallest integer + Interchange it with list[i]
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有