SUBMISSIONS FOR SUMAGCD - did not worked out!

https://www.codechef.com/viewsolution/24826935

Hello ,

the demerits -

  1. i did not handle duplicates
  2. i try to use recursion with two variables i and j to iterate over the
    array ,to partition the array in two parts of non contiguious groups.
  3. i still want to know how to split the array into two non contigious groups ?
  4. i have attached the link to solution , can some one review and let know what are
    corrections / changes that i can made to it to improve its performance ?
    very much thankful , if anyone could help.
    the value of i and j will vary between 0 to n , the code work out for non -repeating case but with repeating array elements the code throws Error ! . Do help me to optimize the code and include optimize programming technique.

for 3) point you can do it by just making a subset of the given array taking in account the complementary of the subset . for making subset try this link https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/tutorial/