Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mdwrigh2
on Nov 20, 2010
|
parent
|
context
|
favorite
| on:
A Google Interviewing Story
How could you do this in O(1)? Or are you saying you can get a probably right answer in O(1)?
swolchok
on Nov 20, 2010
[–]
It's impossible to do in O(1) in the worst case, because you have to at least examine all the input (e.g., if the input matches the regex AA*B.)
mdwrigh2
on Nov 20, 2010
|
parent
[–]
That was my thought process, but the parent of my post claimed he could do it in O(1) (actually, he claimed it in o(1), but I'm assuming he just typo'd). Hence my question.
TARMAP
on Nov 20, 2010
|
root
|
parent
[–]
http://en.wikipedia.org/wiki/Chinese_room
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: