3 ms·
>I'd also be impressed if they came up with the idea of sorting the string and counting characters While that method would identify if a string has the necessa
by garrettgrimsley 10y ago
>I'd also be impressed if they came up with the idea of sorting the string and counting characters
While that method would identify if a string has the necessary attributes of a palindromic string it is not sufficient to prove that a string is a palindrome.
>This is the person judging the candidates on whether they are talented enough at computer science? Yikes.
Right, anyone reading the OP would probably be better served by Steve Yegge's posts[0, 1] on the subject.
[0] https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions https://sites.google.com/site/steveyegge2/five-essential-pho...
[1] http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html http://steve-yegge.blogspot.com/2008/03/get-that-job-at-goog...
Edit: Went back and actually read the code provided, they only use regex for a preprocessing step.
- p4wnc6 10y agoYou're totally right. I was confusing the stated problem with a common associated problem: whether a string is a permutation of a palindrome.