write a function called(adsbygoogle = window.adsbygoogle || []).push({});

which input an array of integers and decides whetherCode (Text):

int partition(int arr[], int size)

it is possible to divide the array into two groups

so the sums of both the groups will be equal.

so they are equal and the function needs to return 1.Code (Text):

for example arr = {1,2,2,3,5,6,1}

its could be divided into {2,2,6} and {1,1,3,5} both of their sums is 10

the function must be recursive without loops.

you are allowed to use only one external recursive function

and i cant use pointers

i tied to build a code that sums for ranges

but the example shows that there could be a possibility

of two sub sequences mixed with one another

so the range option is not solving this

??

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Looking for algoritm to the partition problem C

Loading...

Similar Threads for Looking algoritm partition |
---|

Python Memorizing syntax/steps vs. looking things up |

**Physics Forums | Science Articles, Homework Help, Discussion**