Define a function, find_duplicate.py#L27-L32, that takes in an input and returns an answer. The input is a list of single-occurring elements with one duplicate element. In other words: there are 101 elements, all of which satisfy a range of (1-100); where one of the elements is a duplicate element.
Example input:
[13, 39, 16, 44, 28, 42, 64, 70, 68, 1, 35, 98, 11, 56, 57, 21, 82, 6, 18, 26, 8, 96, 47, 80, 87, 24, 76, 10, 14, 38, 92, 78, 72, 74, 94, 27, 20, 51, 40, 50, 77, 23, 84, 9, 4, 91, 67, 32, 48, 15, 55, 12, 81, 30, 3, 52, 7, 79, 69, 99, 43, 19, 89, 31, 75, 100, 88, 96, 25, 45, 49, 86, 93, 59, 22, 90, 60, 63, 66, 2, 53, 62, 73, 37, 36, 41, 65, 83, 85, 54, 29, 46, 58, 34, 95, 97, 5, 33, 61, 17, 71]
Click to see answer
96
You can find the solution in the solution branch on find_duplicate.py#L27-L39.