mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-27 04:12:40 +08:00
feat(codes/cpp): revert the changes size_t
back to int
This commit is contained in:
@ -33,7 +33,7 @@ int main() {
|
||||
vector<int> nums = { 1, 5, 3, 2, 4, 7, 5, 9, 10, 8 };
|
||||
// 初始化哈希表
|
||||
unordered_map<int, int> map;
|
||||
for (size_t i = 0; i < nums.size(); i++) {
|
||||
for (int i = 0; i < nums.size(); i++) {
|
||||
map[nums[i]] = i; // key: 元素,value: 索引
|
||||
}
|
||||
int index = hashingSearch(map, target);
|
||||
|
Reference in New Issue
Block a user