2014年8月19日

Reverse Integer

摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here a 阅读全文

posted @ 2014-08-19 23:29 bug睡的略爽 阅读(138) 评论(0) 推荐(0) 编辑

Valid Palindrome

摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文

posted @ 2014-08-19 23:10 bug睡的略爽 阅读(149) 评论(0) 推荐(0) 编辑

Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? 阅读全文

posted @ 2014-08-19 22:54 bug睡的略爽 阅读(116) 评论(0) 推荐(0) 编辑

Gas Station

摘要: There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it cost 阅读全文

posted @ 2014-08-19 20:46 bug睡的略爽 阅读(247) 评论(0) 推荐(0) 编辑

Reverse Words in a String

摘要: Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the". click to show clarification. 阅读全文

posted @ 2014-08-19 18:26 bug睡的略爽 阅读(138) 评论(0) 推荐(0) 编辑

Maximum Subarray

摘要: Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array 阅读全文

posted @ 2014-08-19 16:17 bug睡的略爽 阅读(401) 评论(0) 推荐(0) 编辑

导航