上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要: problem:Reverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?solution:头插法逆转链表/*... 阅读全文
posted @ 2015-06-16 19:56 尾巴草 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return... 阅读全文
posted @ 2015-06-16 19:29 尾巴草 阅读(100) 评论(0) 推荐(0) 编辑
摘要: problem:Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321solution:逐个取数字; 处理溢出问题 (INT_MIN INT_MAX)class Soluti... 阅读全文
posted @ 2015-06-16 19:08 尾巴草 阅读(102) 评论(0) 推荐(0) 编辑
摘要: problem:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one uniqu... 阅读全文
posted @ 2015-06-16 16:46 尾巴草 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2015-06-15 09:32 尾巴草 阅读(357) 评论(0) 推荐(0) 编辑
摘要: problems: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100".class Solution {public: string... 阅读全文
posted @ 2015-06-12 15:39 尾巴草 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Problems:Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following ... 阅读全文
posted @ 2015-06-12 15:09 尾巴草 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Problem:Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3]... 阅读全文
posted @ 2015-06-12 14:57 尾巴草 阅读(114) 评论(0) 推荐(0) 编辑
摘要: problems:The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following ... 阅读全文
posted @ 2015-06-12 12:24 尾巴草 阅读(183) 评论(0) 推荐(0) 编辑
摘要: problem:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not... 阅读全文
posted @ 2015-06-09 12:02 尾巴草 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页