Skip to content
Snippets Groups Projects

Single Number

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Kiryuu Sakuya
    Program.cs 204 B
    public class Solution {
        public int SingleNumber(int[] nums) {
                int num = 0;
                for (int i = 0; i < nums.Length; i++)
                    num ^= nums[i];
                return num;
        }
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment