04 2013 档案
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a palindrome.Note:Have you consider that the string might be empty? This is a good questio
阅读全文
摘要:class Solution {public: int lengthOfLongestSubstring(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function int longest = 0; set<char> repeat; string::size_type index1 = 0, index2 = 0; if (0 == s.size()) { ...
阅读全文
摘要:two sum问题:vector<int> twoSum(vector<int> &numbers, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function vector<int> result;for (int i = 0; i < numbers.size(); ++i){ for (int j = i + 1; j < numbers.size(); ++j) { if (target == n...
阅读全文

浙公网安备 33010602011771号