Y
Hacker News
new
|
ask
|
show
|
jobs
by
vcxy
2095 days ago
"Find the earliest valid pdf in consecutive digits of pi"
3 comments
paulmd
2095 days ago
I mean, the answer is trivially zero, there exists a PDF-like structure somewhere in Pi, and the offset of that doesn't have to be zero, it can start or end anywhere. So the range [0, N] is a valid PDF.
link
infogulch
2095 days ago
"Find the last byte of the first valid PDF in the binary digits of Pi"
link
paulmd
2094 days ago
Since the PDF also doesn't have to be end-aligned, the answer is trivially [0, infinity].
The first place a valid PDF could be ended, perhaps.
link
infogulch
2093 days ago
A pdf at [0, N] sorts before the one at [0, N+1], by "first valid pdf".
link
paulmd
2092 days ago
No, both start at 0. Also, [0, infinity] and [0, infinity+1] are the same thing.
link
infogulch
2088 days ago
https://www.online-python.com/OuZ0thRs6D
link
drevil-v2
2095 days ago
Please don't give them any ideas.. the whiteboard interview coding tests are hard enough as it is
link
gedy
2094 days ago
How else will we weed out the fakers and people coasting for 10 years? Our CRUD SaaS app needs top people.
link
ehsankia
2094 days ago
Doesn't sound like that hard of a question, given you are provided the structure of the PDF header. I guess it really comes down to substring search.
link
btown
2095 days ago
Imagine if it was a PDF that simply rendered the number 42.
link
ddalex
2095 days ago
If that happens we know for a fact that we are in a simulation
link