Jane Street interview question

Question on manipulating arrays, prefix/suffix