pad array and rr pad array
median