✅ JAVA fastest solution
0ms runtime\n# JAVA Code\nJAVA []\nclass Solution {\n    public int singleNonDuplicate(int[] nums) {\n        int left = 0, right = nums.length-1;\n        whil
0ms runtime\n# JAVA Code\n``` JAVA []\nclass Solution {\n    public int singleNonDuplicate(int[] nums) {\n        int left = 0, right = nums.length-1;\n        while(left < right){\n            int mid = (left + right)/2;\n            if( (mid % 2 == 0 && nums[mid] == nums[mid +1]) || (mid %2 == 1 && nums[mid] == nums[mid - 1]) )\n                left = mid + 1;\n            else\n                right = mid;\n        }\n        return nums[left];\n    }   \n}\n```\n\n
['Java']