Given an input string, reverse the string word by word.For example, Given s = "the sky is blue", return "blue is sky the".Update (2015-02-12): For C p...
分类:
其他好文 时间:
2015-04-17 09:41:26
阅读次数:
116
把以字符串表示的两个二进制数相加。【思路】活学活用昨天学到的reverse。将倒序相加变成正序相加。但这样的话,就要用到三个reverse,两个原串,最后还要把结果翻转。可能对速度有影响,经测试,好像还比不翻转快一点点。一个point是,两串长度不同,一串加完了另一串怎么办?我的办法是将其视为0,这...
分类:
其他好文 时间:
2015-04-17 09:33:59
阅读次数:
135
Reverse Bits2015.4.17 05:42Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as000000101001010...
分类:
其他好文 时间:
2015-04-17 07:09:09
阅读次数:
108
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 ...
分类:
其他好文 时间:
2015-04-17 07:06:41
阅读次数:
136
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 ...
分类:
其他好文 时间:
2015-04-16 23:33:54
阅读次数:
119
Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes co...
分类:
其他好文 时间:
2015-04-16 19:34:28
阅读次数:
170
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n =
4,
return 1->4->3->2->5->NULL.
Note:
Given m, n satisfy t...
分类:
其他好文 时间:
2015-04-16 15:46:36
阅读次数:
122
问题描述
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 remai...
分类:
其他好文 时间:
2015-04-16 14:22:29
阅读次数:
208
来源: 360 CTF 2014 Reverse20 说明:已在压缩包中给定了一个用ReverseMe.exe加密过后的文件:密文.db请分析ReverseMe.exe的算法,写出解密算法,解密该文件得到Key。该Exe里有一个bug,导致exe无法运行;提示:你有两种方法得到该Key:1.找到bu...
分类:
其他好文 时间:
2015-04-16 12:22:35
阅读次数:
213
题目链接https://leetcode.com/problems/rotate-array/这道题主要是想明白rotate是怎样完成的,举个例子{1,2,3,4,5,6,7}, k=3我们发现完成rotate 3需要进行一下三步1)reverse array {1,2,3,4,5,6,7} => ...
分类:
其他好文 时间:
2015-04-16 06:40:23
阅读次数:
125