2016年10月28日
摘要: 题目: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are 阅读全文
posted @ 2016-10-28 20:08 一只笨笨鸟 阅读(142) 评论(0) 推荐(0) 编辑
  2016年10月26日
摘要: 题目: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see be 阅读全文
posted @ 2016-10-26 18:32 一只笨笨鸟 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 思路:不断取最低位加到先前值得后面,如下: while(x!=0){ res=res*10+x%10; x/ 阅读全文
posted @ 2016-10-26 10:27 一只笨笨鸟 阅读(197) 评论(0) 推荐(0) 编辑
  2016年10月25日
摘要: 题目: 思路: 以图为例:s={'A','B','C','D','E','F','G','H'.....} 1.先不考虑中间元素F、G、H、N...,每一行前后元素在数组中对应下标相差size=2*numRows-2(其中numRows是行数) 例如:第1行起始元素s[0]=A,在不大于数组长度情况 阅读全文
posted @ 2016-10-25 18:29 一只笨笨鸟 阅读(253) 评论(0) 推荐(0) 编辑
  2016年10月24日
摘要: 题目: 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 unique lo 阅读全文
posted @ 2016-10-24 19:07 一只笨笨鸟 阅读(137) 评论(0) 推荐(0) 编辑
  2016年10月22日
摘要: 题目: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexit 阅读全文
posted @ 2016-10-22 20:36 一只笨笨鸟 阅读(111) 评论(0) 推荐(0) 编辑
  2016年10月21日
摘要: 题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the 阅读全文
posted @ 2016-10-21 11:10 一只笨笨鸟 阅读(168) 评论(0) 推荐(0) 编辑
  2016年10月20日
摘要: 题目: 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 sin 阅读全文
posted @ 2016-10-20 11:08 一只笨笨鸟 阅读(85) 评论(0) 推荐(0) 编辑