码迷,mamicode.com
首页 >  
搜索关键字:sort list    ( 66297个结果
c#将list集合转换为datatable的简单办法
public static class ExtensionMethods{/// /// 将List转换成DataTable/// /// /// /// public static DataTable ToDataTable(this IList data){PropertyDescriptorC...
分类:其他好文   时间:2014-05-01 13:03:47    阅读次数:355
C++中,申请字符串数组可用new实现
C++中,申请字符串数组可用new实现:char ** list = new char*[MAX_NUM];for (int i = 0; i,则通过 if (list[qid] != “”) 检测是否初始化。
分类:编程语言   时间:2014-05-01 11:46:12    阅读次数:587
[leetcode]Linked List Cycle @ Python
原题地址:http://oj.leetcode.com/problems/linked-list-cycle/题意:判断链表中是否存在环路。解题思路:快慢指针技巧,slow指针和fast指针开始同时指向头结点head,fast每次走两步,slow每次走一步。如果链表不存在环,那么fast或者fast...
分类:编程语言   时间:2014-05-01 10:33:38    阅读次数:426
[leetcode]Linked List Cycle II @ Python
原题地址:http://oj.leetcode.com/problems/linked-list-cycle-ii/题意:如果链表中存在环路,找到环路的起点节点。解题思路:这道题有点意思。首先使用快慢指针技巧,如果fast指针和slow指针相遇,则说明链表存在环路。具体技巧参见上一篇http://w...
分类:编程语言   时间:2014-05-01 08:19:31    阅读次数:340
Cheatsheet: 2014 04.01 ~ 04.30
Java 115 Java Interview Questions and Answers – The ULTIMATE List 3 Good Reasons to Avoid Arrays in Java Interfaces Other Top 10 Algorithms for Coding...
分类:其他好文   时间:2014-05-01 08:02:00    阅读次数:318
[leetcode]Swap Nodes in Pairs @ Python
原题地址:http://oj.leetcode.com/problems/swap-nodes-in-pairs/题意:将链表中的节点两两交换。Given1->2->3->4, you should return the list as2->1->4->3.解题思路:这题主要涉及到链表的操作,没什么...
分类:编程语言   时间:2014-05-01 06:44:21    阅读次数:339
[leetcode]Remove Nth Node From End of List @ Python
原题地址:http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/题意:Given a linked list, remove thenthnode from the end of list and return its he...
分类:编程语言   时间:2014-05-01 06:42:15    阅读次数:332
排序算法-冒泡——插入——快排
冒泡排序,往两个方向泡,一个往小泡,一个网大泡 #include #include #include void bubble_sort(int *a,int n){ int temp; for(int i=0;i<n;i++) for(int j=0;ja[j+1]){ temp=a[j]; a[j]=a[j+1]; ...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:364
paip.元数据驱动的转换-读取文件行到个list理念 uapi java php python总结
paip.元数据驱动的转换-读取文件行到个list理念 uapi java php python总结 #两个思路 1.思路如下:使用file_get_contents()获取txt文件的内容,然后通过explode()把获得的字符串转化为数组。获得数组长度可以使用count()函数 2.使用按照行读取api 在正则表达式中,有一个\n是newline的意思,又有一个\r是carri...
分类:编程语言   时间:2014-04-28 10:46:40    阅读次数:304
Reverse Linked List II -- LeetCode
原题链接: http://oj.leetcode.com/problems/reverse-linked-list-ii/  这道题是比较常见的链表反转操作,不过不是反转整个链表,而是从m到n的一部分。分为两个步骤,第一步是找到m结点所在位置,第二步就是进行反转直到n结点。反转的方法就是每读到一个结点,把它插入到m结点前面位置,然后m结点接到读到结点的下一个。总共只需要一次扫描,所以时间是O(n...
分类:其他好文   时间:2014-04-28 10:38:42    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!