employer cover photo
employer logo
employer logo

Susquehanna International Group

Engaged employer

Susquehanna International Group interview question

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.)

Interview Answers

Anonymous

15 Jan 2014

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

Anonymous

1 Dec 2017

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

Anonymous

1 Dec 2017

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

Anonymous

1 Dec 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;