摘要:
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.class Solution {public:string tostrin... 阅读全文
posted @ 2015-02-10 12:51
Vae永Silence
阅读(189)
评论(0)
推荐(0)
摘要:
Implement pow(x,n).class Solution {public: double pow(double x, int n) { if(n==0)return 1.0; if(n0) { double half=p... 阅读全文
posted @ 2015-02-10 12:42
Vae永Silence
阅读(131)
评论(0)
推荐(0)
摘要:
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc... 阅读全文
posted @ 2015-02-10 12:41
Vae永Silence
阅读(145)
评论(0)
推荐(0)
摘要:
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.class Solution {public:void... 阅读全文
posted @ 2015-02-10 12:39
Vae永Silence
阅读(130)
评论(0)
推荐(0)
摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4,−1,2,1,... 阅读全文
posted @ 2015-02-10 12:37
Vae永Silence
阅读(148)
评论(0)
推荐(0)