Create an algorithm that divides a given array of numbers into two sets such that the sum of the elements in each set is the same.

[5, 10, 15, 20]
user
Set 1: [5, 15] 
Set 2: [10, 20] 
Algorithm:
1. Create two empty sets, set1 and set2. 
2. Add the first number in the list to set1. 
3. Calculate the sum of the numbers in set1 and set2. 
4. If sum of set1 is less than the sum of set2, add the next number to set 1. If the sum of set1 is greater than the sum of set2, add the next number to set2. 
5. Repeat step 4 until all numbers in the list have been added to one of the sets.
assistant