码迷,mamicode.com
首页 >  
搜索关键字:reverse nodes    ( 8673个结果
iOS 生成pem证书
openssl pkcs12-inCertificates.p12-outCertificates.pem-nodes需要通过终端命令将这些文件转换为PEM格式:openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-c...
分类:移动开发   时间:2014-07-09 21:28:58    阅读次数:251
[leetcode] Reverse Words in a String
Given an input string, reverse the string word by word.
分类:其他好文   时间:2014-07-08 22:41:34    阅读次数:187
[LeetCode]Swap Nodes in Pairs
[LeetCode]Swap Nodes in Pairs...
分类:其他好文   时间:2014-07-08 20:40:15    阅读次数:161
翻转整数 Reverse digits of a number
两种方法翻转一个整数,顺序翻转和递归翻转这里没考虑overflow的情况递归的作用是使得反向处理,即从递归栈的最低端开始处理,通过画图可得。如果是rec(num/10):123451234123121         package recursion; public class Reverse_digits_of_a_number { public static void main(Str...
分类:其他好文   时间:2014-07-08 18:34:14    阅读次数:208
【剑指offer】Q16:翻转链表
def reverse(head): if head == None or head.next == None: return head psuhead = ListNode(-1) while head: nexthead = head.next head.next = psuhead.next psuhead.next = head head = nexthead ...
分类:其他好文   时间:2014-07-08 15:27:58    阅读次数:183
【剑指offer】数组中的逆序对
# @left part: [start, mid] # @right part: (mid, end] def merge(data, start, mid, end): if mid < start or end < mid: return 0 reverse = 0 ''' @ for start, it play as the start index of left par...
分类:其他好文   时间:2014-07-08 15:04:06    阅读次数:204
【LeetCode】Swap Nodes in Pairs
题目 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 constant spac...
分类:其他好文   时间:2014-07-08 13:46:26    阅读次数:205
用递归翻转一个栈 Reverse a stack using recursion
明确递归语句之前的语句都是顺序执行,而递归语句之后的语句都是逆序执行package recursion; import java.util.Stack; public class Reverse_a_stack_using_recursion { /* Input stack: 3 2 1 Output stack: 1 2 3 */ public s...
分类:其他好文   时间:2014-07-08 13:39:49    阅读次数:143
HDU 4587 TWO NODES (双连通割点应用)
题意:N个点(0~n-1),M条无向边,问去掉2个点后最多的连通分块有多少。 先去掉一个点求出各个割点,并在dfs过程中求出去掉这个割点有多少个连通分块(将iscut[u]=true改为iscut[u]++), 这样子第二次就可以直接找出最多的连通分块了。 #include #include #include #include #include #include #inclu...
分类:其他好文   时间:2014-07-08 13:06:23    阅读次数:145
POJ 2309 BST 树状数组基本操作
Description Consider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this ...
分类:其他好文   时间:2014-07-06 11:36:14    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!