摘要: Problem Given a string s , find the longest palindromic substring in s . You may assume that the maximum length of s is 1000. Example Input: "babad" O 阅读全文
posted @ 2017-08-04 16:01 Aneureka 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Problem Given a string, find the length of the longest substring without repeating characters. Example Given "abcabcbb", the answer is "abc", which th 阅读全文
posted @ 2017-08-04 16:00 Aneureka 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Problem The string is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for bette 阅读全文
posted @ 2017-08-04 15:59 Aneureka 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Description The Hamming Distance Problem Thinking 枚举排列问题,从左到右递归处理。 Answer c++ include using namespace std; int ds; int N, H; int count(int A, int num, 阅读全文
posted @ 2017-08-04 15:57 Aneureka 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Thinking 贪心 + 二分 Answer c++ include include using namespace std; int k; // the amount of items struct item{ long long price; long long pos; }; bool co 阅读全文
posted @ 2017-08-04 15:54 Aneureka 阅读(398) 评论(0) 推荐(0) 编辑