leetcode
u010912405
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Simple Number II
Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without usi原创 2014-11-01 22:11:09 · 452 阅读 · 0 评论 -
Reverse Words in a String
class Solution { public: void reverseWords(string &s) { string ss; int i = s.length()-1; while(i>=0) { while(i>=0&&s[i] == ' ') {原创 2014-11-01 19:10:59 · 404 阅读 · 0 评论 -
Maximum Product Subarray
public class Solution { public int maxProduct(int[] A) { int n=A.length; if(n==0) return 0; if(n==1) return A[0]; int curMin=A[0]; int curMax=A[0];原创 2014-11-01 19:19:37 · 423 阅读 · 0 评论 -
leetcode Word Break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = "leetcode", dict = ["leet"原创 2014-11-01 20:27:21 · 441 阅读 · 0 评论
分享