上一页 1 ··· 16 17 18 19 20

2015年4月12日

摘要: int func(int n){ if (n ==0) return 0; if (n == 1) return 1; int p = 0; int q = 1; for (int i = 1; i < n; i++){ int... 阅读全文
posted @ 2015-04-12 22:05 月下之风 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Title : Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three i 阅读全文
posted @ 2015-04-12 13:09 月下之风 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Title: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the 阅读全文
posted @ 2015-04-12 11:03 月下之风 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Title : https://leetcode.com/problems/container-with-most-water/ Given n non-negative integers a1, a2, ..., an, where each represents a point at coord 阅读全文
posted @ 2015-04-12 10:41 月下之风 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Title : Determine whether an integer is a palindrome. Do this without extra space. 思路1 : 将数字翻转,然后看是否相等。是否越界的问题,如果真是回文串是不会越界的 思路2: 从左右两边分别验证是否相等 阅读全文
posted @ 2015-04-12 10:25 月下之风 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Title : Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not se 阅读全文
posted @ 2015-04-12 10:05 月下之风 阅读(126) 评论(0) 推荐(0) 编辑

2015年4月11日

摘要: Title : Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 主要注意的问题是防止数组越界的问题。还有通过除法、取模计算的要记住 阅读全文
posted @ 2015-04-11 11:01 月下之风 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Title :Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, an... 阅读全文
posted @ 2015-04-11 09:40 月下之风 阅读(166) 评论(0) 推荐(0) 编辑

2012年4月27日

该文被密码保护。 阅读全文
posted @ 2012-04-27 19:50 月下之风 阅读(3) 评论(0) 推荐(1) 编辑
上一页 1 ··· 16 17 18 19 20

导航