https://www.codechef.com/viewsolution/24826935
Hello ,
the demerits -
- i did not handle duplicates
- 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. - i still want to know how to split the array into two non contigious groups ?
- 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.