If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:
[ ] This PR represents the translation of a single, complete document, or contains only bug fixes.
[ ] The translation accurately conveys the original meaning and intent of the Chinese version. If deviations exist, I have provided explanatory comments to clarify the reasons.
If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist:
[ ] I have thoroughly reviewed the code, focusing on its formatting, comments, indentation, and file headers.
[ ] I have confirmed that the code execution outputs are consistent with those produced by the reference code (Python or Java).
[ ] The code is designed to be compatible on standard operating systems, including Windows, macOS, and Ubuntu.
理解K神这个实现主要是为了演示邻接矩阵的基本原理,但在实际使用中可能会遇到一些限制:在实际应用中,通常使用顶点的值而不是索引来操作图。所以,为了更“公平”地与邻接表方法的对比,进行了改进:
If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:
If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist: