码迷,mamicode.com
首页 >  
搜索关键字:list    ( 54897个结果
Leetcode:Convert Sorted List to Binary Search Tree
Description :Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.分析:这道题目简单版是把一个排序好的数组转成平衡的二叉树...
分类:其他好文   时间:2014-06-16 10:51:54    阅读次数:237
Debian /etc/apt/sources.list
# Debian 源列表说明## 本文以 wheezy 版本为例,使用时注意适当修改。# 同一仓库的官方主站和各镜像站点只可取其一,不可叠加。# -----------------------------------------------------------------------------...
分类:其他好文   时间:2014-06-16 10:50:54    阅读次数:219
[leetcode]Remove Duplicates from Sorted List II @ Python
原题地址:https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/题意:Given a sorted linked list, delete all nodes that have duplicate number...
分类:编程语言   时间:2014-06-16 10:40:35    阅读次数:340
List ArrayList LinkedList vector简介与区别
ArrayList,LinkedList,Vestor这三个类都实现了java.util.List接口,但它们有各自不同的特性,主要如下: ArrayList:底层用数组实现的List 特点:查询效率高,增删效率低 轻量级 线程不安全 LinkedList:底层用双向循环链表实现的List 特点:查...
分类:其他好文   时间:2014-06-16 10:07:45    阅读次数:291
对[foreach]的浅究到发现[yield]
原文:对[foreach]的浅究到发现[yield] 闲来无事,翻了翻以前的代码,做点总结,菜鸟从这里起航,呵呵。一、List的foreach遍历 先上代码段[1]: 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 List d...
分类:其他好文   时间:2014-06-16 08:39:02    阅读次数:223
Leetcode: Merge k Sorted List
参看别人的思路,类似MergeSort的思路,思路是先分成两个子任务,然后递归求子任务,最后回溯回来。这个题目也是这样,先把k个list分成两半,然后继续划分,直到剩下两个list就合并起来,合并时会用到Merge Two Sorted Lists这道题。 1 /** 2 * Definition....
分类:其他好文   时间:2014-06-16 08:26:57    阅读次数:150
Leetcode:Partition List 链表快速排序划分
Partition ListGiven a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should pres...
分类:其他好文   时间:2014-06-12 06:18:55    阅读次数:562
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!