标签:href exit memory admin esc near btn https ota
Description Submission Solutions Add to List
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
class Solution { public: int singleNumber(vector<int>& nums) { int res = 0; for(int num : nums){ res ^= num; } return res; } };
标签:href exit memory admin esc near btn https ota
原文地址:http://www.cnblogs.com/93scarlett/p/6390848.html