Files
leetcode/23/10/Q136.h
2025-09-15 21:12:04 +08:00

24 lines
341 B
C++

//
// Created by 李洋 on 2023/10/14.
//
#ifndef LEECODE_C_Q136_H
#define LEECODE_C_Q136_H
#include <vector>
using namespace std;
class Q136 {
public:
int singleNumber(vector<int> &nums) {
int count = 0;
for (int i: nums) {
count ^= i;
}
return count;
}
};
#endif //LEECODE_C_Q136_H