摘要: 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 below 阅读全文
posted @ 2014-06-01 17:50 Double_win 阅读(455) 评论(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 @ 2014-06-01 15:10 Double_win 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 前言 【LeetCode 题解】系列传送门: http://www.cnblogs.com/double-win/category/573499.html 1.题目描述 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to ... 阅读全文
posted @ 2014-05-30 21:41 Double_win 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo 阅读全文
posted @ 2014-05-30 17:21 Double_win 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 前言 【LeetCode 题解】系列传送门: http://www.cnblogs.com/double-win/category/573499.html 1.题目描述 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to ... 阅读全文
posted @ 2014-05-29 20:40 Double_win 阅读(296) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi 阅读全文
posted @ 2014-05-26 10:50 Double_win 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 前言 【LeetCode 题解】系列传送门: http://www.cnblogs.com/double-win/category/573499.html 1.题目描述 Given an array of integers, find two numbers such that they add up to a specific target number. The fu... 阅读全文
posted @ 2014-05-25 23:19 Double_win 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 前言 【LeetCode 题解】系列传送门: http://www.cnblogs.com/double-win/category/573499.html 1.题目描述 Find the contiguous subarray within an array (containing at least one number) which has the largest sum... 阅读全文
posted @ 2014-05-22 22:56 Double_win 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 前言 【LeetCode 题解】系列传送门: http://www.cnblogs.com/double-win/category/573499.html 1.题目描述 There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You h... 阅读全文
posted @ 2014-05-22 22:38 Double_win 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 题目描述: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the tot 阅读全文
posted @ 2014-05-22 16:53 Double_win 阅读(231) 评论(0) 推荐(0) 编辑