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

2011年5月28日

算法导论(CLRS, 2nd) 个人答案 Ch2.1
摘要: 2.1-1:2.1-2:NON-INCREASING-INSERTION-SORT(A) forj: 1~ length(A)-1: if(A[j]< A[j-1]): key= A[j]; t = j-1; while(A[t]< key && t>=0): A[t+1]= A[t]; t--; A[t]= key; returnA;2.1-3:// Assumption: Ifthere're duplicated elements, only return// the index of the first element.LINEAR-SEARC 阅读全文
posted @ 2011-05-28 11:35 songyy 阅读(376) 评论(0) 推荐(0)
 
算法导论(CLRS, 2nd) 个人答案 Ch1
摘要: 1.1-1Sorting: rank thestudent's according to the scoreDetermining thebest order for multiplying matrices: When doingprobability calculation, one may require lots of matrices multiplication for the cumulative probabilityresultsFinding the convexhull: 1.1-2Space1.1-3Linked list:Strength: can beuse 阅读全文
posted @ 2011-05-28 11:31 songyy 阅读(509) 评论(0) 推荐(0)
 
 

公告


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