mirror of
https://github.com/lWolvesl/leetcode.git
synced 2026-01-13 02:38:37 +08:00
init
This commit is contained in:
23
23/10/Q136.h
Normal file
23
23/10/Q136.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user