Question: I have deep link which redirects user to activity. Deep link looks like "https://example.com/login/userId". Is there any way I can get this userId in activity?

UPD. It seems I didn't explain my question clearly. User clicks on link in his email and opens app with intent. And in this activity i need to get part deep link which was redirected him to this activity

Answer: 
From what I understood, you need to see if your array can be divided into 2 equal arrays and return `True` if it does else you return `False`, you don't need the arrays it gets divided to, just the fact that it can be divided.

Well if it your array can be divided into 2 equal arrays, some of its elements should sum to the half of the total sum of your array.

For example :

```
[5,3,5,2,10,1]

```

This array has the sum of 26. if some of its elements can be equal to 13 then it can be divided into 2 arrays of equal arrays, because the rest of the elements would sum to 13 too. `example : [10,3] and [5,5,2,1]`, so you return True when you find that a combination of elements of your array equals half the sum of the total array. Also automatically an array with an odd sum is not dividable to 2 equal arrays. nb : searching for all combinations has a high complexity and will be slow with big lists.

This is what exactly i am doing, using itertools to get the combinations that sum to the half the total sum of the array, if there are combinations then it can be divided to 2 equal arrays, test it :

```
import itertools
numbers = [135, 129, 141, 121, 105, 109, 105, 147]

if((sum(numbers)%2)!=0):
    print(False)
else:
    result = [seq for i in range(len(numbers), 0, -1) for seq in itertools.combinations(numbers, i) if sum(seq) == (sum(numbers)//2)]
    if len(result)>1:
        print(True)
    else:
        print(False)

```
Here is the function that you need, it returns True when the array can be divided into 2 equal arrays and False if it cannot, without use of any libraries :

```
def search(numbers):
    target = sum(numbers)/2
    def subset_sum(numbers, target, partial=[]):
        s = sum(partial)

        if s == target:
            print(5/0)
        if s >= target:
            return 

        for i in range(len(numbers)):
            n = numbers[i]
            remaining = numbers[i + 1:]
            subset_sum(remaining, target, partial + [n])
    try:
        subset_sum(numbers, target)
        return False

    except:
        return True

numbers = [135, 129, 141, 121, 105, 109, 105, 147]
print(search(numbers))

```