码迷,mamicode.com
首页 >  
搜索关键字:list comprehension    ( 54937个结果
Sort List
Sort a linked list in O(n log n) time using constant space complexity.思路:使用O(nlogn)时间复杂度和常数空间复杂度,我们想到可以用归并排序。1)找到链表中间位置2)将两个链表按序合并链表3)对所给链表进行整体的归并排序/*...
分类:其他好文   时间:2014-06-27 00:22:37    阅读次数:303
Leetcode: Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5...
分类:其他好文   时间:2014-06-26 23:07:29    阅读次数:276
Ubuntu安装配置Mysql
Ubuntu安装配置Mysql三种安装方式: 1. 从网上安装 sudo apt-get install mysql-server。装完已经自动配置好环境变量,可以直接使用mysql的命令。 注:建议将/etc/apt/source.list中的cn改成us,美国的服务器比中国的快很多。 ...
分类:数据库   时间:2014-06-26 22:46:44    阅读次数:370
linux常用命令的英文单词缩写
命令缩写:ls:list(列出目录内容)cd:Change Directory(改变目录)su:switch user切换用户rpm:redhat package manager红帽子打包管理器pwd:print work directory打印当前目录 显示出当前工作目录的绝对路径ps: proc...
分类:系统相关   时间:2014-06-26 22:15:58    阅读次数:460
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason:
最近接受的这个项目需要Android SDK Tools revision 22.6.2 or above.,所以必须得更新SDK,然而在SDKmanager中更新android SDK 总是提示:Fetching http://dl-ssl.google.com/android/repositor...
分类:移动开发   时间:2014-06-26 20:41:54    阅读次数:918
算法:全组合算法
public static List combin(final int TOTAL, final int SELETED) { List list = new ArrayList(400000); int[] i = new int[SELETED]; ...
分类:其他好文   时间:2014-06-25 12:01:05    阅读次数:126
JDK源码学习LinkedList
LinkedList是List接口的子类,它底层数据结构是双向循环链表。LinkedList还实现了Deque接口(double-end-queue双端队列,线性collection,支持在两端插入和移除元素).所以LinkedList既可以被当作双向链表,还可以当做栈、队列或双端队列进行操作......
分类:其他好文   时间:2014-06-25 11:50:14    阅读次数:251
hdu1671Phone List(字典树)
#include #include #include #include using namespace std; typedef struct Node { struct Node *next[10]; int flag; }Node,*Tree; int flag1; void Cre...
分类:其他好文   时间:2014-06-25 11:27:43    阅读次数:154
leetcode--Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:其他好文   时间:2014-06-25 11:10:16    阅读次数:163
qemu 编译安装
sudoapt-getinstallautomakesudoapt-getinstalllibtool./configure--target-list=x86_64-softmmu--prefix=/opt/qemu-2.0.0--enable-kvm--enable-sdlmakesudomakeinstall
分类:其他好文   时间:2014-06-25 10:32:10    阅读次数:365
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!