• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
厚积薄发
| 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

02 2011 档案

 
Skip List(跳表) 分析
摘要:Normal 0 false 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE 最近上课讲了一个挺陌生的概念,叫做Skip List。搜索了一下,中文名称作“跳表”。写这个题目的原因:不过中文blog讲得都很浅:http://hideto.javaeye.com/blog/297625http://www.kernelchina.org/?q=node/239(刚刚baidu搜索了一下,百度文库里面有很好的介绍SkipList的文章:【1】http://wenku.baidu.com/view/7285945f804d2b160b4ec0a8.ht. 阅读全文
posted @ 2011-02-24 07:36 songyy 阅读(6527) 评论(1) 推荐(2)
算法导论(CLRS, 2nd) 个人答案 Ch5.1
摘要:5.1-1:Since we can compare between any two elements, we know the total order on the ranks of the candidates.5.1-2:RANDOM(a,b)%range = b - a;%d = the number of binary bits %range hasdofor(%i = 1 to %d):%i th bit of integer %res = rand(0,1);while(%res > %range);return (a + %res);Each time of while 阅读全文
posted @ 2011-02-16 00:56 songyy 阅读(478) 评论(0) 推荐(0)
算法导论(CLRS, 2nd) 个人答案 Ch6.1
摘要:6.1 - 1:Define n to be the number of elements in a heap of height h, then:6.1-2:6.1-3:For any of the sub-tree of one max-heap, it maintains the basic heap property, i.e., A[parent(i)] >= A[i]. and the root of one sub-tree is the ancestor of all its nodes, therefore, the root is the largest by rec 阅读全文
posted @ 2011-02-10 01:08 songyy 阅读(539) 评论(7) 推荐(0)
算法导论 个人答案 12.2 (未完)
摘要:(今天主要解决了昨天遗留的问题。在上课的论坛上讨论还是很有效的。12.2未结)12.2-1:[代码]12.2-5:If one BST node has two children, then its predecessor is the maximum of its leftsub-tree, and its successor is the minimum of its right sub-tree. The smallestelement has no left child, and the largest one has no right child.12.2-6:Think from 阅读全文
posted @ 2011-02-08 00:20 songyy 阅读(917) 评论(0) 推荐(0)
算法导论(CLRS, 2nd) 个人答案 Ch12.1
摘要:我打算发一下自己对于算法导论书里面的个人答案。欢迎大家指正。因为读的是英文版,这里也用英文来发吧:)12.1 What is a binary search tree12.1-1:12.1-2:BSP Property: Let x be a node in BST, if y is a node in the left subtree of x, then:key[x]>= key[y]; if y is a node on the right subtree of x, then key[x]<=key[y].Min-Heap Property: for any node x, 阅读全文
posted @ 2011-02-07 00:41 songyy 阅读(1644) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3