会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
翔鸽
二叉堆
摘要: 堆 如何手写一个堆? 首先堆是一颗完全二叉树,结合完全二叉树的性质我们可以利用数组来存储一棵树。每个结点的编号从1开始。 插入一个数。 heap[++size] = x; up(size); 求集合当中的最小值。heap[1] 删除最小值。 heap[1] = heap[size]; size--;
阅读全文
posted @ 2021-02-06 14:36 翔鸽
阅读(52)
评论(0)
推荐(0)
1107 Social Clusters——PAT甲级真题
摘要: 1107 Social Clusters When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the
阅读全文
posted @ 2021-02-06 09:28 翔鸽
阅读(98)
评论(0)
推荐(0)
导航
博客园
首页
联系
订阅
管理
公告