0. 新与旧两种reverse>>> L = [1,2,3,4]>>> R = L[::-1] # new object>>> R[4, 3, 2, 1]>>> L.reverse() # in place>>> L[4, 3, 2, 1]>>>两种sort>>> sorted(r) # new o...
分类:
编程语言 时间:
2015-03-28 06:20:12
阅读次数:
172
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-28 01:04:10
阅读次数:
151
写一个翻转函数,使字符串倒叙 先把整个句子翻转 然后以空格为split,分割字符串 对单个字符再进行翻转,然后重新组合 package reverseSentence42; public class ReverseSentence42 { static String reverse(String s...
分类:
其他好文 时间:
2015-03-27 21:53:43
阅读次数:
194
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2015-03-22 06:49:21
阅读次数:
131
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-03-21 21:08:04
阅读次数:
177
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-03-21 19:53:11
阅读次数:
151
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-03-21 15:39:18
阅读次数:
118
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2015-03-21 15:18:53
阅读次数:
133
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-21 12:35:31
阅读次数:
143
1 class Solution { 2 public: 3 void swap(int &a, int &b){int t = a; a = b; b = t;}; 4 void reverse(vector &num, int start, int end) { 5 ...
分类:
其他好文 时间:
2015-03-21 11:00:51
阅读次数:
98