码迷,mamicode.com
首页 >  
搜索关键字:sort    ( 12890个结果
《泛型编程与stl》笔记
以下是STL六大组件(componments): adapters  配接器 用来修饰其他组件。包括iterator adapters、function  adapters、container adapters三大类。 allocators 配置器 用来分配空间。空间可来自于内存或磁盘--取决于配置器如何 实现。主要用来服务容器。 algorithms 算法 如sort,bineary...
分类:其他好文   时间:2015-03-03 15:18:24    阅读次数:376
算法篇---圈排序Cycle Sort
经典排序算法 - Cycle Sort所谓的圈的定义,我只能想到用例子来说明,实在不好描述待排数组[ 6 2 4 1 5 9 ]排完序后[ 1 2 4 5 6 9 ]数组索引[ 0 1 2 3 4 5 ]第一部分 第一步,我们现在来观察待排数组和排完后的结果,以及待排数组的索引,可以发现排完序后的6...
分类:编程语言   时间:2015-03-02 20:42:07    阅读次数:176
Extjs3.4 合并单元格
Ext3.4合并单元格表格上添加grid-row-span样式列Renderer绑定预览效果样式:代码:原文:http://www.sencha.com/forum/showthread.php?103133-GridPanel-row-spanning-%28well-sort-of...%29
分类:Web程序   时间:2015-03-02 09:30:11    阅读次数:281
c#之委托
利用委托和泛型实现冒泡排序 class BubbleSorter { static public void Sort(IList sortArray,Func comparison) { bool swapped = true; do{ swapped = false; ...
分类:Windows程序   时间:2015-03-02 09:24:03    阅读次数:170
直接插入排序(内部排序)
1 package com.trfizeng.insertionsort; 2 3 /** 4 * 5 * @author trfizeng 内部排序 插入排序 --- 直接插入排序(Straight Insertion Sort) 6 * 7 */ 8 public class S...
分类:编程语言   时间:2015-03-01 23:45:26    阅读次数:211
冒泡排序(内排序)
主要是相邻2个记录的比较交换 1 package com.trfizeng.changesort; 2 3 /** 4 * @author trfizeng 内部排序 交换排序—冒泡排序(Bubble Sort) 5 */ 6 public class BubbleSort { 7 p...
分类:编程语言   时间:2015-03-01 23:38:35    阅读次数:157
快速排序(内排序)
1 /** 2 * 3 */ 4 package com.trfizeng.changesort; 5 6 /** 7 * @author trfizeng 内部排序 交换排序—快速排序(Quick Sort) 8 */ 9 public class QuickSort {10 11 ...
分类:编程语言   时间:2015-03-01 23:38:14    阅读次数:260
简单的选择排序(内部排序)
1 /** 2 * 3 */ 4 package com.trfizeng.selectionsort; 5 6 /** 7 * @author trfizeng 内部排序 选择排序—简单选择排序(Simple Selection Sort) 8 */ 9 public class S...
分类:编程语言   时间:2015-03-01 23:34:45    阅读次数:219
几种常见算法
#include <iostream> using namespace std; void paopao_sort(int arr[], int nSize) { for(int i=0;i<nSize;i++) { for(int j=0;j<nSize-1-i;j++) { if(arr[j] > arr[j+1]) { int nTmp = arr[j...
分类:编程语言   时间:2015-03-01 18:36:29    阅读次数:255
温故而知新【快速排序】
#if !defined(_SORT_INCLUDED_H) #define _SORT_INCLUDED_H #include /* 分别使用递归和循环来实现快速排序,虽然已经写了4年多代码了 但是发现一次性写的完整无误还真是...呵呵 author:davidsu33 datetime:2015-3-1 */ /* 快速排序,使用递归 */ template void swap_val...
分类:编程语言   时间:2015-03-01 17:08:22    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!