NVIDIA interview question

Write a version of the C function tail