Challenge Information

Title : Partition of Array
Difficulty : Medium
Solutions : 10
Maximum Score : 100
Completed by You: No
Description :

There is an array. You have to find out whether that array can be divided into two subarrays or not such that the sum of the elements in both parts will be the same.

Write a function solve that have the following parameter(s):
1.) arr = array of integer

Example
Input:
arr = [2, 1, 10, 5, 2]
Output:
YES

Explanation
It's subarray will be
(2,1,2,5), (10)
The sum of both arrays will be the same (10), (10).

Example
Input:
arr = [2, 3, 7, 5]
Output:
NO

Explanation
No subarray can be produced.

Constraints

Judocode