码迷,mamicode.com
首页 >  
搜索关键字:reverse nodes    ( 8673个结果
【leetcode】Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2014-05-19 11:38:43    阅读次数:246
linux 内存管理
linux 引入了 Node的概念7 bootmem_data_t bootmem_node_data[MAX_NUMNODES] __initdata其中MAX_NUMNODES0005 #ifdef CONFIG_NODES_SHIFT0006 #define NODES_SHIFT C...
分类:系统相关   时间:2014-05-19 11:32:43    阅读次数:298
LeetCode: Reverse Nodes in k-Group [024]
【题目】 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is. You may not alter the values in the nodes, only n...
分类:其他好文   时间:2014-05-18 10:22:34    阅读次数:367
LeetCode:Evaluate Reverse Polish Notation
题意:            Evaluate the value of an arithmetic expression in Reverse Polish Notation.        Valid operators are +, -, *, /. Each operand may be an integer or another expression.        So...
分类:其他好文   时间:2014-05-18 08:09:15    阅读次数:190
LeetCode:Reverse Words in a String
题目: Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Clarification: What constitutes a word? A sequence of non-spa...
分类:其他好文   时间:2014-05-18 04:12:07    阅读次数:198
Leetcode | Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o...
分类:其他好文   时间:2014-05-18 02:34:57    阅读次数:352
Leetcode | Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then le...
分类:其他好文   时间:2014-05-18 01:53:53    阅读次数:331
Python sorted
sorted函数:iterable:是可迭代类型;cmp:用于比较的函数,比较什么由key决定,有默认值,迭代集合中的一项;key:用列表元素的某个属性和函数进行作为关键字,有默认值,迭代集合中的一项;reverse:排序规则. reverse = True 或者 reverse = False,有...
分类:编程语言   时间:2014-05-17 23:36:24    阅读次数:511
[leetcode]_Reverse Integer
经历了三道树的题后,完全崩溃中,急需一道非树图的题来挽救信心。题目:反转数字。input : 123 , output : 321.思路:直接,没什么好说的。自己代码:很龊,有大量的冗余信息,还申请了一个List,虽然AC了,但有很大改进空间。public int reverse(int x) { ...
分类:其他好文   时间:2014-05-15 14:22:31    阅读次数:212
javascript 常用的数组操作
join()Array.join(/*optional*/separator)将数组转换为字符串,可带一个参数separator(分隔符,默认为“,”)。与之相反的一个方法是:String.splict(),将字符串分隔成若干块来创建一个新的数组。reverse()Array.reverse(),颠倒数组元素的顺序,返回逆向的数组.注意此方法会修..
分类:编程语言   时间:2014-05-15 00:31:23    阅读次数:441
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!