Repeating And Missing Element Leetcode Python