\class Solution { public: int getMissingNumber(vector<int>& nums) { set<int> S; for(int i = 0; i <= nums.size(); i++)S.insert(i); for(auto x : nums)S.erase(x); return *S.begin(); } };