09 2015 档案

摘要:Description:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents... 阅读全文
posted @ 2015-09-06 09:04 Rosanne 阅读(161) 评论(0) 推荐(0)
摘要:Description:Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Code:#define NU... 阅读全文
posted @ 2015-09-06 08:35 Rosanne 阅读(143) 评论(0) 推荐(0)
摘要:Description:Given an integern, return all distinct solutions to then-queens puzzle.Each solution contains a distinct board configuration of then-queen... 阅读全文
posted @ 2015-09-05 16:58 Rosanne 阅读(166) 评论(0) 推荐(0)
摘要:Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin... 阅读全文
posted @ 2015-09-02 16:33 Rosanne 阅读(144) 评论(0) 推荐(0)
摘要:Description:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one uniqu... 阅读全文
posted @ 2015-09-02 15:38 Rosanne 阅读(146) 评论(0) 推荐(0)
摘要:Description:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S=... 阅读全文
posted @ 2015-09-02 15:11 Rosanne 阅读(157) 评论(0) 推荐(0)
摘要:Description:Write a function to find the longest common prefix string amongst an array of strings.(最长公共字串)Code:string merge(string&str1, string&str2) ... 阅读全文
posted @ 2015-09-01 10:36 Rosanne 阅读(186) 评论(0) 推荐(0)
摘要:Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin... 阅读全文
posted @ 2015-09-01 10:01 Rosanne 阅读(156) 评论(0) 推荐(0)