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...
阅读全文
摘要:Description:Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Code:#define NU...
阅读全文
摘要:Description:Given an integern, return all distinct solutions to then-queens puzzle.Each solution contains a distinct board configuration of then-queen...
阅读全文
摘要:Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin...
阅读全文
摘要:Description:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one uniqu...
阅读全文
摘要: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=...
阅读全文
摘要:Description:Write a function to find the longest common prefix string amongst an array of strings.(最长公共字串)Code:string merge(string&str1, string&str2) ...
阅读全文
摘要:Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin...
阅读全文