自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 Solution for exercise 1.3-7 in Introduction to Algorithms

Describe a θ(nlgn)-time algorithm that, given a set S of n real numbers and another real number x, determines whether or not there exist two elements in S whose sum is exactly x.Solution: First, sort

2006-03-22 16:57:00 1487

原创 Solution for exercise 1.3-5 in Introduction to Algorithms

Referring back to the searching problem (see Exercise 1.1-3), observe that if the sequence A is sorted, we can check the midpoint of the sequence against v and eliminate half of the sequence from furt

2006-03-22 16:00:00 1279

原创 Merge sort in C++

/*  * A is an array and p, q, and r are indices numbering elements of the array  * such that p  *  * This procedure assumes that the subarrays A[p. .q] and A[q + 1. .r] are in  * sorted order. It merg

2006-03-22 15:05:00 2705

原创 Solution for exercise 1.2-3 in Introduction to Algorithms

Consider the problem of determining whether an arbitrary sequence (x1, x2, . . . , xn) of n numbers contains repeated occurrences of some number. Show that this can be done in θ(n lg n) time, where

2006-03-21 15:14:00 1430

原创 Solution for exercise 1.2-1 in Introduction to Algorithms

Consider sorting n numbers stored in array A by first finding the smallest element of A and putting it in the first entry of another array B. Then find the second smallest element of A and put it i

2006-03-21 13:53:00 1262

原创 Solution for exercise 1.1-4 in Introduction to Algorithms

Consider the problem of adding two n-bit binary integers, stored in two n-element arrays A and B. The sum of the two integers should be stored in binary form in an (n + 1)-element array C. State th

2006-03-20 17:36:00 1949

转载 How Eclipse Finds Your Classes at Runtime

In Eclipse each plug-in has its own class loader and has its own class look-up path that is derived from the imported plug-ins. A separate class loader gives each plug-in a separate name space for its

2006-03-20 11:43:00 1320

空空如也

空空如也

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

TA关注的人

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