码迷,mamicode.com
首页 >  
搜索关键字:lists    ( 2473个结果
[LeetCode]Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘...
分类:其他好文   时间:2015-02-07 23:01:47    阅读次数:153
leetcode_160_Intersection of Two Linked Lists
思路: 暴力解法,将第一个链表的所有结点放进HashSet,然后看第二个链表从头开始的第一个存在HashSet中的元素就是两个链表相交的地方。 方法不够好,题目说的空间复杂度最好为O(1)...
分类:其他好文   时间:2015-02-07 17:32:48    阅读次数:230
LeetCode 023 Merge k Sorted Lists
题目要求:Merge k Sorted ListsMergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.分析:参考网址:http://blog.csdn.net/...
分类:其他好文   时间:2015-02-07 17:19:56    阅读次数:194
[LeetCode] Merge k Sorted Lists
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.方法一:实现merger2Lists,然后两个两个List Merge,直到最后,不过超时了class So...
分类:其他好文   时间:2015-02-07 15:44:27    阅读次数:154
[UITableView]简介
An instance ofUITableView(or simply, a table view) is a means for displaying and editing hierarchical lists of information.一个UITableVIew(简单的来讲,一个表格视图)...
分类:其他好文   时间:2015-02-07 13:06:59    阅读次数:205
Leetcode:Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2015-02-07 09:08:17    阅读次数:165
七周七语言——Erlang第二天自习
键值对 题目:考虑包含键-值元组的列表,如[{erlang, “a functinal language”}, {ruby, “an OO language”}]。写一个函数,接受列表和键为参数,返回该键对应的值。 get_value(Map, Key) -> element(2, hd(lists:dropwhile(fun({K, _})-> Key /= K end, Map) +...
分类:编程语言   时间:2015-02-06 20:31:23    阅读次数:228
CI获取自定义配置文件中的二维配置数组
CI获取自定义配置文件中的二维配置数组:如:在admin.php配置文件中有如下配置:$config['admin_menu'][] = array( 'name' => '商品管理', 'c' => 'goods', 'a' => 'lists', 'icon'=>' ic...
分类:编程语言   时间:2015-02-05 13:12:37    阅读次数:208
[leetCode][003] Intersection of Two Linked Lists
【题目】: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists:...
分类:其他好文   时间:2015-02-04 14:17:01    阅读次数:193
leetcode.21------------Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题目:合并两个单链表 思路:先比较两个各链表第一个节点,大的那个节点先设为合并的链表第一个节点,...
分类:其他好文   时间:2015-02-04 13:06:08    阅读次数:136
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!