Single Non Repeating Element Leetcode Javascript