```
vector<int>::reverse_iterator rit = digits.rbegin();
for ( ; rit != digits.rend(); ++rit) {
if (1+*rit != 10 ) {
*rit = *rit + 1;
return digits;
} else {
*rit = 0;
}
}
digits.insert(digits.begin(),1);
return digits;
```