Pergunta de entrevista da empresa Susquehanna International Group

Write a function that is passed a string and determines whether or not the string is a palindrome. (They had me write on the whiteboard in front of them.)

Respostas da entrevista

Sigiloso

15 de jan. de 2014

I used for-loops and character arrays and got the question right.

Sigiloso

1 de dez. de 2017

I think the double index way is pretty neat. for(int i=0,j=n-1;i

Sigiloso

1 de dez. de 2017

I think the double index way is pretty neat. for(int i=0,j=n-1;i

Sigiloso

1 de dez. de 2017

I think the double index way is pretty neat. for(int i=0,j=n-1;i < j;i++,j--) if(s[i]!=s[j]) return false; return true;