mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-19 20:55:57 +08:00
feat(codes/cpp): revert the changes size_t
back to int
This commit is contained in:
@ -22,7 +22,7 @@ vector<int> randomNumbers(int n) {
|
||||
|
||||
/* 查找数组 nums 中数字 1 所在索引 */
|
||||
int findOne(vector<int>& nums) {
|
||||
for (size_t i = 0; i < nums.size(); i++) {
|
||||
for (int i = 0; i < nums.size(); i++) {
|
||||
if (nums[i] == 1)
|
||||
return i;
|
||||
}
|
||||
|
Reference in New Issue
Block a user