An ordered sequence of numbers from 1 to N is given. One number might have deleted from it, then the remaining numbers were mixed. Find the number that was deleted.

Example: 
 - The starting array sequence is `[1,2,3,4,5,6,7,8,9]`
 - The mixed array with one deleted number is `[3,2,4,6,7,8,1,9]`
 - Your function should return the int `5`.

If no number was deleted from the array and no difference with it, your function should return the int `0`.

Note that N may be 1 or less (in the latter case, the first array will be `[]`).

Difficulty: introductory

Starter code:

def find_deleted_number(arr, mixed_arr):
	

Solutions:
def find_deleted_number(arr, mixed_arr):
    return sum(arr)-sum(mixed_arr)

def find_deleted_number(a, b):
    return (set(a) - set(b)).pop() if len(a) != len(b) else 0

def find_deleted_number(arr, mixed_arr):
    lost = 0
    for i in arr:
        if i not in mixed_arr:
            lost = i
            
    return lost

find_deleted_number=lambda a,m: next((e for e in set(a)-set(m)), 0)

def find_deleted_number(arr, mixed_arr):
    return 0 if not arr else arr[-1]*(arr[-1]+1)/2 - sum(mixed_arr)

def find_deleted_number(arr, mixed_arr):
    return len(arr) > len(mixed_arr) and (set(arr) - set(mixed_arr)).pop()

def find_deleted_number(arr, mixed_arr):
    res = []
    for n in arr:
        if n not in mixed_arr: return n
    return 0

def find_deleted_number(arr, mixed_arr):
    #Works only if exactly one number is missing
    return sum(arr)-sum(mixed_arr)

def find_deleted_number(arr, mixed_arr):
    #Your code here
    ret = 0
    for i in arr:
        if i not in mixed_arr:
            ret = i
    
    return ret

def find_deleted_number(arr, mixed_arr):
    arr = set(sorted(arr))
    mixed_arr = set(sorted(mixed_arr))
    return 0 if arr == mixed_arr else list(arr.difference(mixed_arr))[0]