give integer array num length n want create array ans length 2n ansi numsi ansi n numsi 0 n 0indexedspecifically ans concatenation num arraysreturn array ans Example 1input num 121output 121121explanation the array an form follow an nums0nums1nums2nums0nums1nums2 an 121121example 2input num 1321output 13211321explanation the array an form follow ans nums0nums1nums2nums3nums0nums1nums2nums3 an 13211321 Constraintsn numslength1 n 10001 numsi 1000