文件名称:mergeosrt
介绍说明--下载内容来自于网络,使用问题请自行百度
申请空间,使其大小为两个已经排序序列之和,该空间用来存放合并后的序列
设定两个指针,最初位置分别为两个已经排序序列的起始位置
比较两个指针所指向的元素,选择相对小的元素放入到合并空间,并移动指针到下一位置
重复步骤3直到某一指针达到序列尾
将另一序列剩下的所有元素直接复制到合并序列尾-Application space, so the size of the two already sorted sequences, and, after the merger of the space used to store the sequence of two pointers to set initial position of the two already sorted sequences were the starting position by comparing two pointers point to elements, select elements into a relatively small space to merge, and move the pointer to the next location Repeat step 3 until the end of a pointer to sequence all of the other sequence elements direct the remaining copy to the end of the merger sequence
设定两个指针,最初位置分别为两个已经排序序列的起始位置
比较两个指针所指向的元素,选择相对小的元素放入到合并空间,并移动指针到下一位置
重复步骤3直到某一指针达到序列尾
将另一序列剩下的所有元素直接复制到合并序列尾-Application space, so the size of the two already sorted sequences, and, after the merger of the space used to store the sequence of two pointers to set initial position of the two already sorted sequences were the starting position by comparing two pointers point to elements, select elements into a relatively small space to merge, and move the pointer to the next location Repeat step 3 until the end of a pointer to sequence all of the other sequence elements direct the remaining copy to the end of the merger sequence
(系统自动生成,下载前可以参看下载内容)
下载文件列表
mergeosrt.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.