Short Javascript Binary Search Solution
\nvar singleNonDuplicate = function(nums) {\n    if (nums.length == 1) return nums[0];\n    return bsa(0, nums.length - 1);\n    function bsa(start, end) {\n   
```\nvar singleNonDuplicate = function(nums) {\n    if (nums.length == 1) return nums[0];\n    return bsa(0, nums.length - 1);\n    function bsa(start, end) {\n        let mid = Math.floor((start + end) / 2);\n        if (nums[mid] == nums[mid - 1]) return mid % 2 ? bsa(mid + 1, end) : bsa(start, mid);\n        if (nums[mid] == nums[mid + 1]) return mid % 2 ? bsa(start, mid - 1) : bsa(mid, end);\n        return nums[mid];\n    }\n};\n```\n
['Binary Tree', 'JavaScript']