Hacker Times
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jacquesm
on May 27, 2010
|
parent
|
context
|
favorite
| on:
Interviewing programmers: coding test results.
Apropos your first example it really was O(n^2) all the time, I just ran a bunch of tests on various optimization settings and the strlen gets called every iteration of the loop.
I think you owe 'bwithe' a beer.
mcu
on May 27, 2010
[–]
You're right, I should have left in 'int len = strlen(z_terminated);'
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
I think you owe 'bwithe' a beer.