Microsoft
3.6 of 5 7,478 reviews
www.microsoft.com Redmond, WA 5000+ Employees

Microsoft Senior Software Development Engineer In Test (SDET) Interview Question

I interviewed in Seattle, WA and was asked:
"finad all plaindromes ina string."
Add Tags [?]
Answer Flag Question

Part of a Senior Software Development Engineer In Test (SDET) Interview Review - one of 3,342 Microsoft Interview Reviews

Answers & Comments

1
of 3
votes
i couldn't really come up with decent code for this, and i think this was the turning point in the interview which otherwise was going alright.
- Interview Candidate on Aug 14, 2012 Flag Response
0
of 0
votes
vector<string> findAllPalindrome ( string str)
{
    vector<char> stack;
    vector<string> result;
    string buff = "";
    int len = str.length();

    if (len == 0)
    return result;

    stack.push_back(str[0]);
    for (int i = 1; i<len; ++i)
    {
        if (str[i] == stack.back())
        {
            buff.insert(0,str[i]);
            buff.push_back(str[i]);
            result.push_back(buff);
            stack.pop_back();
        }
        else
        {
            int buffLen = buff.length();
            for (int j = 0; j< buffLen; ++j)
            {
                stack.push_back(buff[j]);
            }
            stack.push_back(str[i]);
        }
    }
    return result;
}
- Eric on Nov 2, 2012 Flag Response

To comment on this question, Sign In with Facebook or Sign Up


Tags are like keywords that help categorize interview questions that have something in common.

Glassdoor is your free inside look at Microsoft interview questions and advice. All interview reviews posted anonymously by Microsoft employees and interview candidates.