12 2020 档案

最小生成树——Prim算法以及输出邻接矩阵
摘要:看了b站懒猫老师的视频,整理了最小生成树Prim算法 集合V为图中所有点集合,集合U为已经在最小生成树里的点集合,V-U为还没放入的点MGraph:MGraph有arc[N][N]域和vertexNum域,分别存储点与点之间边的权值(图的邻接矩阵),总结点数MGraph为图的结构体,存储图中结点之间 阅读全文

posted @ 2020-12-29 23:06 wang_dahua 阅读(463) 评论(0) 推荐(0)

二分查找搜索要插入位置
摘要:leetcode题目: https://leetcode-cn.com/problems/search-insert-position/submissions/ int searchInsert(int* nums, int numsSize, int target){ int n = numsSi 阅读全文

posted @ 2020-12-06 15:36 wang_dahua 阅读(184) 评论(0) 推荐(0)

导航