Full-Stack Software Engineer, loves mountain climbing and exploring new things.
Tags: LeetCode
package lc_136; public class Solution { public int singleNumber(int[] nums) { int ans = 0; for (int num: nums){ ans = ans ^ num; } return ans; } }
Check out the description of this problem at LC 136.