Question: Q 5 : Given a list arr which contains only positive integers. Can you divide the list into 2 sub lists so that sum of

Q5: Given a list arr which contains only positive integers. Can you divide the list into 2 sub lists so that sum of
each sub list is same? The returned value from your code should be either "True" (i.e., Yes as you can divide it) or
"False" (i.e., No as you can't divide it.)
For example, if arr is 3,1,5,9,12, you should return True as you can divide arr into 2 sub lists 1,5,9 and [3,
12.
For example, if arr is 3,1, you should return False.
Hint: You may need the following codes: import numpy as np, Totl = np.sum(arr) where the function np.sum
calculates the sum of all the elements in arr. Please use python code to solve this question
 Q5: Given a list arr which contains only positive integers. Can

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!