hong

hong hong

Niner since 2004

Comments

  • Gary Daniels and Evan Goldring - Mock whiteboard problem

    I'd liek to try my simple C++:

    bool isPalen(const string & s)
    {
       int len = s.length();
       if(len <= 0)  // we can also add more string checking here
       {
           cerr << "empty input" << endl;
           return false;
       }
       for(int i = 0; i < len / 2; ++i)
       {
           cout << s[i] << endl;  // for debugging
           if(s[i] != s[len - i - 1])
                return false;
       }
       return true;
    }

    I'm a new graduate and I wish some engineer in Microsoft liked to interview me.