Missing After Shuffle

You have a complete list full and another list part made by removing exactly one element from it and shuffling the rest. Write a function find_deleted that finds which number disappeared. The solution should run in O(N). The order of elements in the second list does not matter.

Примеры

Ввод
[1, 2, 3, 4, 5], [1, 2, 4, 5]
Вывод
3
Ввод
[10, 20, 30], [10, 30]
Вывод
20
Ввод
[5], []
Вывод
5

Нужно реализовать

def find_deleted(full: list[int], part: list[int]) -> int:

Теги

arraymath
PostgreSQLv16
Entre para enviar

O resultado da execução do código aparecerá aqui

Visible tests
1
Input
[1,2,3,4,5], [1,2,4,5]
Expected3
2
Input
[10,20,30], [10,30]
Expected20
3
Input
[5], []
Expected5
4
Input
[1,1,2], [1,2]
Expected1
5
Input
[7,8,9,10], [10,8,7]
Expected9
6
Input
[2,3,4,5,6], [1,2]
Expected17
Focus radio
Paused · SomaFM · Fluid