Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenation of Array #8

Closed
iaryangoyal opened this issue Oct 1, 2021 · 2 comments
Closed

Concatenation of Array #8

iaryangoyal opened this issue Oct 1, 2021 · 2 comments
Assignees
Labels

Comments

@iaryangoyal
Copy link
Collaborator

Given an integer array nums of length n, you want to create an array ans of length 2n where ans[i] == nums[i] and ans[i + n] == nums[i] for 0 <= i < n (0-indexed).

Specifically, ans is the concatenation of two nums arrays.

Return the array ans.

Example 1:

Input: nums = [1,2,1]
Output: [1,2,1,1,2,1]
Explanation: The array ans is formed as follows:

  • ans = [nums[0],nums[1],nums[2],nums[0],nums[1],nums[2]]
  • ans = [1,2,1,1,2,1] #
@Dipti821
Copy link
Contributor

Dipti821 commented Oct 1, 2021

Hello @iaryangoyal I would like to take this task

@iaryangoyal
Copy link
Collaborator Author

Yes, go ahead! @Dipti821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants