09 2015 档案
摘要:https://leetcode.com/problems/longest-palindromic-substring/manacher算法相关:http://blog.csdn.net/ywhorizen/article/details/6629268class Solution {public:...
阅读全文
摘要:https://leetcode.com/problems/zigzag-conversion/The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may...
阅读全文
摘要:https://leetcode.com/problems/reverse-integer/class Solution {public: int inf = ~0u >> 1; int reverse(int x) { if(x == 0)return 0; ...
阅读全文
摘要:思路:设现在可用区间在nums1是[s1,t1),nums2:[s2,t2)1.当一个数组可用区间为0的时候,由于另一个数组是已经排过序的,所以直接可得当要取的是最小值或最大值时,也直接可得2.明显两个数组总长度为偶数的时候需要取最中间两个元素/2.0,长度为奇数时,只需要求最中间那个.所以只需要分...
阅读全文