PEC-CSS/Open-Source

Find elements of original array from doubled array

Gauravsharma-20 opened this issue · 4 comments

Given an array arr[] of 2*N integers such that it consists of all elements along with the twice values of another array, say A[], the task is to find the array A[].

Example:
Input: arr[] = {4, 1, 18, 2, 9, 8}
Output: 1 4 9
Explanation:
After taking double values of 1, 4, and 9 then adding them to the original array, All elements of the given array arr[] are obtained

Input: arr[] = {4, 1, 2, 2, 8, 2, 4, 4}
Output: 1 2 2 4

Would you like to assign this issue to me?

Hello , I also like to work on this problem.

@Meghwantsingh this has already been assigned. Can you look for another issue