Comments (1)
在
c/chapter_hashing/array_hash_map.c
中, 构造函数并未初始化哈希表中的桶,运行时出现了段错误,建议做出如下修改:/* 构造函数(修改前) */ ArrayHashMap *newArrayHashMap() { ArrayHashMap *hmap = malloc(sizeof(ArrayHashMap)); return hmap; }/* 构造函数(修改后) */ ArrayHashMap *newArrayHashMap() { ArrayHashMap *hmap = malloc(sizeof(ArrayHashMap)); for (int i = 0; i < HASHTABLE_CAPACITY; i++) { hmap->buckets[i] = NULL; } return hmap; }
好的,谢谢,已经更改815a35c
from hello-algo.
Related Issues (20)
- docker build error HOT 1
- 二叉搜索树&&CPP HOT 1
- 关于递归概念的一点疑问 HOT 1
- 希望算法介绍/讲解更全面 HOT 2
- 建一个社区交流群,方便读者集中讨论 HOT 1
- 深度优先遍历演示的图建议换成有环的(最好演示不记录已访问节点会怎么样) HOT 1
- Coding
- 请问英语有pdf版吗? HOT 3
- Good repository HOT 1
- Good repository
- Good repository
- Good repository
- Good repository HOT 1
- Good repository
- Good repository HOT 1
- Good repository
- 描述示例有歧义 HOT 2
- ENGLISH PLEASE HOT 1
- 网页版书籍查看评论区的时候,可以手动/自动过滤“打卡”的评论吗? HOT 3
- Typo-English : `1.1 Algorithms are everywhere` : obsecure -> obscure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hello-algo.