[LeetCode][136]-Single-numbers.cs

public class Solution { public int SingleNumber(int[] nums) { int res=0; for(int i=0; i<nums.Length; i++){ // X^X = 0, X^0 = X Where X is an integer res^=nums[i]; } return res; } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.