码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
Leetcode--easy系列10
#205 Isomorphic Strings Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a charact...
分类:其他好文   时间:2015-06-25 23:05:32    阅读次数:344
[LeetCode] Reverse Words in a String II
Problem Description:Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string d...
分类:其他好文   时间:2015-06-25 18:55:01    阅读次数:119
Leetcode--easy系列8
#172  Factorial Trailing Zeroes   Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 一个很直观的想法是用递归求出n!然后/10 计算末...
分类:其他好文   时间:2015-06-25 17:30:33    阅读次数:115
【备忘录】javascript字符串翻转
var fruit = "apple banana pear";var arr = fruit.split(' ');for (var i = 0; i < arr.length; i++) { arr[i] = arr[i].split('').reverse().join('');}v...
分类:编程语言   时间:2015-06-25 16:59:59    阅读次数:134
Reverse Linked List
Description:Reverse a singly linked list.Code: 1 ListNode* reverseList(ListNode* head) { 2 ListNode* preNode = NULL; 3 ListNode* p = head; 4 ...
分类:其他好文   时间:2015-06-25 13:44:21    阅读次数:75
Reverse Bits
Description:Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as000000101001010000011110100111...
分类:其他好文   时间:2015-06-25 10:19:54    阅读次数:151
序列判断
stopword=‘‘ str=‘‘ forlineiniter(raw_input,stopword): str+=line+‘\n‘ L=str.strip().split(‘\n‘) L_num=[] forcinL: L_num.append(int(c)) L_down=L_num[:] L_up=L_num[:] L_down.sort(reverse=1) L_up.sort() print‘L_down=‘,L_down print‘L_up=‘,L_up ifL_num==L_down: p..
分类:其他好文   时间:2015-06-25 01:36:40    阅读次数:150
String 常用方法实现总结(一)
1. reverse /** * @Description: reverse a string. * @param str the String to reverse, may be null * @return reversedStr the reversed String, null if null String input */ publi...
分类:其他好文   时间:2015-06-24 16:32:37    阅读次数:129
LeetCode:Reverse LinkedListⅡ
Problem: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...
分类:其他好文   时间:2015-06-24 12:52:00    阅读次数:106
Leetcode 02 Add Two Numbers
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-06-23 23:08:04    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!