Intuition Loop through input array and fill answer array in one pass. Approach In one forloop set the ans[i] and ans[i + nums.Length]to the current value at nums[i]. Code public class Solution { public int[] GetConcatenation(int[] nums) { ...
Markdown supported · ⌘↵ to post
No responses yet.