rxxjxxk

rxxjxxk rxxjxxk

Niner since 2010

Comments

  • Gary Daniels and Evan Goldring - Mock whiteboard problem

    bool is_palindrome(char *string) {
    int length = strlen(string);
    for(int i = 0; i < length / 2; ++i) {
    if (string[i] != string[length-i-1])
    return false;
    }
    return true;
    }

     

    bool is_palindrome(char *string) {
    	int length = strlen(string);
    	
    	for(int i = 0; i < length / 2; ++i) {
    		if (string[i] != string[length-i-1])
    			return false;
    	}
    	
    	return true;
    }