"Given an infinitely long linked list which you can only traverse once select a random item with O(1) storage."
I assume they meant arbitrarily long instead of infinitely long. In which case, I just wrote that code today:
val := nil
for i, x in range a {
if rand.Intn(i+1) == 0 {
val = x
}
}