Riffle shuffle 2 given arrays in O(n) time and O(1) space

You are given 2 arrays

x1, x2, x3,.....xn and y1, y2,.... yn. Riffle shuffle the arrays in place, such that they look like x1,y1,x2,y2....xn,yn

You need to do its in O(n) time and constant memory ( O(1) space)