码迷,mamicode.com
首页 >  
搜索关键字:sort join    ( 21848个结果
冒泡排序
public class BubbleSortLib { public int[] Sort(int[] arr) { for (int outer = arr.Length - 1; outer...
分类:其他好文   时间:2014-05-28 03:12:37    阅读次数:223
STL之heap
STL的堆操作STL里面的堆操作一般用到的只有4个:make_heap();、pop_heap();、push_heap();、sort_heap();他们的头文件函数是#include 首先是make_heap();他的函数原型是:void make_heap(first_pointer,end_...
分类:其他好文   时间:2014-05-28 02:15:50    阅读次数:291
线程操作
//终止thread1线程 thread1.Abort(); //主线程挂起等待,直到thread1完全终止 thread1.Join(); //thread1线程已终止,主线程继续执行Abort执行后线程并没有立即结束,线程在被终止之前立即进入AbortRequested状态,所以才会有你遇到的问...
分类:编程语言   时间:2014-05-27 17:55:25    阅读次数:406
js数字、字符串、数组之间的转化
1.数组转字符串var a, b;a = new Array(0,1,2,3,4);b = a.join("-");2.字符串转数组var s = "abc,abcd,aaa";ss = s.split(",");3.数字转字符串
分类:Web程序   时间:2014-05-26 18:05:05    阅读次数:292
53. 特殊的O(n)时间排序[sort ages with hashtable]
sort ages with hashtable
分类:其他好文   时间:2014-05-26 01:24:25    阅读次数:329
Java多线程之join
将另外一个线程join到当前线程,则需要等到join进来的线程执行完才会继续执行当前线程。package Thread.join;class Sleeper extends Thread { private int duration; public Sleeper(String name...
分类:编程语言   时间:2014-05-25 22:17:16    阅读次数:363
初窥c++11:lambda函数
为什么需要lambda函数 匿名函数是许多编程语言都支持的概念,有函数体,没有函数名。1958年,lisp首先采用匿名函数,匿名函数最常用的是作为回调函数的值。正因为有这样的需求,c++引入了lambda 函数,你可以在你的源码中内联一个lambda函数,这就使得创建快速的,一次性的函数变得简单了。例如,你可以把lambda函数可在参数中传递给std::sort函数 #include ...
分类:编程语言   时间:2014-05-25 21:35:27    阅读次数:377
堆排序理解 完整代码
/*自我修改* Note: 堆排序(Heap Sort)*/#include using namespace std;// 输出当前堆的排序状况void PrintArray(int data[], int size){ for (int i=1; i a[i]) // 符号修改后形成...
分类:其他好文   时间:2014-05-25 19:07:25    阅读次数:227
总结(5.23)
1.php注释://单行注释,/* */多行注释,/** * */文档注释。2.复习:字符串+数字=数字array_shift;数组的第一个,array_pop;数组的最后一个,array_push;数组添加。数组:array_sort:数组的值按升序排列,array_arsort:数组的值按降序排...
分类:其他好文   时间:2014-05-25 18:53:22    阅读次数:237
Geeks : Kruskal’s Minimum Spanning Tree Algorithm 最小生成树
寻找图中最小连通的路径,图如下: 算法步骤: 1. Sort all the edges in non-decreasing order of their weight. 2. Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. If cycle is n...
分类:其他好文   时间:2014-05-25 07:35:59    阅读次数:301
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!