由买买提看人间百态

topics

全部话题 - 话题: pcursorp
(共0页)
x****n
发帖数: 74
1
来自主题: JobHunting版 - Google 2nd interview questions
Not sure. Just my two cents. May have missed some special cases you
mentioned
bool DoesStringMatchPatternOrder(char* pString, char* pPattern)
{
if( !pString && !pPattern)
return false;
char* pCursorS = pString;
char* pCursorP = pPattern;
while(*pCursorS && *pCursorP){
while( *pCursorS && *pCursorS != *pCursorP)
pCursorS++;
pCursorP++;
}
return (*pCursorS) && (!*pCursorP);
}

guess
(共0页)