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...
分类:
其他好文 时间:
2014-08-30 11:14:19
阅读次数:
209
1.vim$zabbix_PATH/include/menu.inc.php284行增加以下内容284‘zatree‘=>array(285‘label‘=>_(‘Zatree‘),286‘user_type‘=>USER_TYPE_ZABBIX_USER,287‘default_page_id‘=>0,288‘force_disable_all_nodes‘=>true,289‘pages‘=>array(290array(‘url‘=>‘http:/..
分类:
其他好文 时间:
2014-08-30 02:28:09
阅读次数:
1092
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-08-30 01:11:08
阅读次数:
286
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-08-30 00:06:58
阅读次数:
359
1 Clone Graph题目:Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes ...
分类:
其他好文 时间:
2014-08-29 14:35:48
阅读次数:
190
题目:
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only cons...
分类:
其他好文 时间:
2014-08-29 13:13:37
阅读次数:
169
图结构(Graph Structures)是了解Theano内在工作原理的基础。
Theano编程的核心是用符号占位符把数学关系表示出来。
图结构的组成部分
如图实现了这段代码:
importtheano.tensor as T
x= T.matrix('x')
y= T.matrix('y')
z= x + y
变量节点(variable nodes)
红色表示...
分类:
其他好文 时间:
2014-08-29 11:04:07
阅读次数:
323
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.public cl...
分类:
其他好文 时间:
2014-08-29 01:16:36
阅读次数:
267
【题意】
逆波兰表达式,又叫后缀表达式。
例如:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9
["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6
【思路】
用一个栈存储操作数,遇到操作数直接压入栈内,遇到操作符就把栈顶的两个操作数拿出来运算一下,然后把运算结果放入栈内。
【Jav...
分类:
其他好文 时间:
2014-08-28 21:13:36
阅读次数:
247
【题意】
给定一个字符串,把里面的单词逆序输出来。
例如:给定 s = "the sky is blue",返回 "blue is sky the"。
注意:接收的字符串开头和结尾可能有空格,但是返回时开头和结尾不能有空格;返回时每两个单词之间只能有一个空格。
【Java代码】
public class Solution {
public String reverseWords(...
分类:
其他好文 时间:
2014-08-28 18:10:15
阅读次数:
199