PhoenixZq
分享是一门艺术~~
摘要: 题目:输入一个字符串,输出该字符串中对称的子字符串的最大长度。比如输入字符串“google”,由于该字符串里最长的对称子字符串是“goog”,因此输出4。#include<iostream>#include <string>using namespace std;int MaxLength(char* pString){ if(NULL == pString) return 0; int maxLength = 1; char* pChar = pString; char* Position; int currentLength; while(*pChar !=  阅读全文
posted @ 2011-08-05 21:01 PhoenixZq 阅读(1628) 评论(0) 推荐(0) 编辑