Create Target Array in the Given Order Solutions in GoNumber 1389Difficulty EasyAcceptance 84.3%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func createTargetArray(nums []int, index []int) []int { result := make([]int, len(nums)) for i, pos := range index { copy(result[pos+1:i+1], result[pos:i]) result[pos] = nums[i] } return result}package leetcode func createTargetArray(nums []int, index []int) []int { result := make([]int, len(nums)) for i, pos := range index { copy(result[pos+1:i+1], result[pos:i]) result[pos] = nums[i] } return result }