News for hackers. Stuff that matters.
Re:How to win the coding interview by jaredsohn on Tuesday May 31, 2016 @01:09AM (#11804717)
If you use a bucket sort, your time complexity could be O(max(n,k)) and space O(k) where k is the size of the character set and n is the length of the string. Depending on the relationship between n and k, this could be faster than n log n. (But the pointers solution or even comparing against a reversed string seems better for both time and space.)

Also, your solution is poor since it only tells you that a string is _not_ a palindrome in certain cases but cannot tell with certainty that a string is a palindrome. For example, 'aabb' will pass your test but is not a palindrome.

Re:How to win the coding interview by p4wnc6 on Tuesday May 31, 2016 @09:24AM (#11806351)
I assume the 'poor' solution you meant was the sort and count solution. You're totally right. I was confusing the stated problem with a common associated problem: whether a string is a permutation of a palindrome.