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

No, I think worrying about data structures should come before worrying about language efficiency. But coming up with a counter example to your challenge is hardly possible because you worded it in a way that is sufficiently vague to dispute any suggested counter-example by saying "virtually any algorithm".

But how about substring search? Using Python's string.find instead of something like a suffix tree certainly carries more than a constant time penalty (Obviously for memory complexity it's the other way around in this case). The same goes for blindly using a standard Python list when you plan to insert lots of items in the middle.

Not knowing the complexity of operations on standard data structures inevitably leads to "basic algorithm mistakes". How would you choose a good algorithm without knowing the datastrucure it's operating on?



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

Search: