```
class Solution {
public:
int missingNumber(vector<int>& nums) {
int size = nums.size();
int isExe[size + 1] = {0};
for(int i = 0; i < size; i++) {
isExe[nums[i]] = 1;
}
for(int i = 0; i < size + 1; i++) {
if(isExe[i] == 0) return i;
}
}
};
```