自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

亲密数

通信,编程,软件,数据,互联网等

  • 博客(5)
  • 收藏
  • 关注

原创 Longest Repeated Substring

I wrote the a program to get the Longest Repeated Substring of a string. I think the way I used should be Dynamic Programming. The basic steps are:1) First find all Repeated Substrings with only one c

2011-06-29 17:53:00 1571

原创 堆:左倾树

堆是一种树型数据结构,一般组织成二叉树的形式。堆具有这样的属性,对于每一个节点,父节点上的元素大于子孙节点。具体实现可以用链表,也可以用数组。优先队列(Priority Queue)可以用堆来实现。下面介绍一种左倾树(Leftist Tree)的实现方式,参考Algorithms:a functional programming approach. 左倾树首先是堆,具有堆的属性。左倾树的每

2011-06-26 23:13:00 1384

原创 tail recursive

Followed 3 functions written in Haskell language, which are fac1, fac2 and fac3. They are all for calculating factorial. The performance of them are different. fac1 10000 takes (0.97 secs, 10469

2011-06-19 20:16:00 1025

原创 Get middle element of a linked-list

Suppose therere odd number of elements in a linked-list, how to get the middle element in it? I find a clever way to achieve this on internet. Two pointers point to the linked-list. One is slow point

2011-06-19 01:52:00 766

原创 How to compare linked-lists?

We say two linked-lists are equal if they have the same number of elements, and the elements themselves are the same. Furthermore elements order are not significant. If compared linked-lists are

2011-06-09 17:20:00 630

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除