Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I posted how to do it in another comment on the thread.


If you're using OR (unlike the OP) how are you removing the left side of the window? And still, even if the newest character is unique, previous characters might not be


Input: "abccdef"

Your algorithm will report a match at "bccd" since the "a" wasn't removed from the bitmask.


Yes, you are correct you would have to xor them back out


I swear I have seen this conversation before. A glitch?


If you XOR them together, you get back to the original conversation.


No - he responded on both parts of the thread where i commented. I started to respond here as well, then updated it to redirect to the other comment so we don't end up with two long threads.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: