Pergunta de entrevista da empresa Intuit

pseudo code to check if a string is a palindrome

Resposta da entrevista

Sigiloso

23 de dez. de 2011

Perhaps a bit more efficient: var palindrome = "dogeeseseegod" int x = 0; int y = palindrome .length-1; while(x <= y) { if(palindrome [x] != palindrome [y]) return false; x++; y--; } return true;

1