自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 资源 (6)
  • 收藏
  • 关注

原创 数据结构与算法分析课后习题第五章

5.3 Write a program to compute the nubmer of collisions required in a long random sequence of insertions using linear probing, quadratic probing, and double hashing.5.17 Implement a generic Map that

2007-03-29 16:07:00 1658

原创 数据结构与算法分析课后习题第四章(4)

4.40 Write a routine to list out the nodes of a binary tree in level-order. List the root, then nodes at depth 1, followed by nodes at depth 2, and so on.4.44 Write a procedure to traverse a tree st

2007-03-29 15:59:00 4311

原创 数据结构与算法分析课后习题第四章(3)

4.38 The larger binary trees in this chapter were generated automatically by a program. This was done by assigning an (x,y) coordinate to each tree node, drawing a circle around each coordinate (this

2007-03-29 15:45:00 1231

原创 数据结构与算法分析课后习题第四章(2)

4.16 Redo the binary search tree class to implement lazy deletion. Note carefully that this affects all of the routines. Especially challenging are findMin and findMax, which must now be done recursiv

2007-03-16 17:05:00 2301

原创 数据结构与算法分析课后习题第四章(1)

4.11 Write an implementation of the set class, with associated iterators using a binary search tree. Add to each node a link to the parent node.4.12 Write an implementation of the map class by stori

2007-03-16 16:53:00 1718

原创 数据结构与算法分析课后习题第三章(11)

 3.31 Efficiently implement a stack class using a singly linked list, with no header or tail nodes.3.32 Efficiently implement a queue class using a singly linked list, with no header or tail nodes.

2007-03-13 17:10:00 2030

原创 数据结构与算法分析课后习题第三章(10)

3.29 Write an algorithm for printing a singly linked list in reverse, using only constant extra space.This instruction implies that you cannot use recursion but you may assume that your algorithm is a

2007-03-13 16:55:00 2599

原创 数据结构与算法分析课后习题第三章(9)

3.26 Show how to implement three stacks in one array.3.28 A deque is a data structrue consisting of a list of items, on which the following operations are possible:push(x): Insert item x on the fr

2007-03-07 17:40:00 1105

原创 数据结构与算法分析课后习题第三章(8)

3.24 Write routines to implement two stacks using only one array. Your stack routines should not declare an overflow unless every slot in the array is used3.25 Propose a data structure that supports

2007-03-07 17:32:00 1703

原创 模板初步

 最近看Thinking in c++ vol2感觉获益不少,今天看到STL感觉还是蛮震撼的,短短的几句话,简单的模版就解决了问题先看个例子: #include #include #include #include using namespace std;templateclass unary_composer { Func1 f1; Func2 f2;public: unary_

2007-03-06 20:17:00 601

原创 delete object, inline所需的注意及一些杂想

MFC经常会遇到创建画刷的句子CBrush* pBrush = new CBrush(RGB(0,0,0));CBrush* pOldBrush = dc.SelectObject(brush);//做点事情dc.SelectObject(pOldBrush);delete pBrush;delete dc.SelectObject(pOldBrush);//危险~!!

2007-03-06 20:14:00 600

原创 延后变量的定义

原来只是理解了这个的一部分,就是在使用前定义可以更明确的调用变量,不产生没有使用的变量,但是关于在循环中该如何处理这个问题一直没有考虑过,今天看了effectve c++才恍然大悟,先看:假设C是个定义好的类case1: C ob;while(i!=n) {    ob = 取决于i的某个值;    ++i;} case2:while(i!=n){ 

2007-03-06 20:06:00 557

原创 Head first design patterns c++实现, decorator

//beverage.h    component#ifndef BEVERAGE_H__#define BEVERAGE_H__#include class Beverage {public: Beverage():description("Unknown beverage"),cost(0){} virtual double Cost() = 0; virtual std::str

2007-03-06 19:55:00 683

原创 数据结构与算法分析课后习题第三章(7)

3.19 Rewrite the List class without using header an tail nodes and describe the differences between the class and the class provided in Section 3.53.21 Write a program to check for balancing symbols

2007-03-06 18:33:00 1859

原创 数据结构与算法分析课后习题第三章(6)

Exercise 3.13 Add support for operator-- to the List iterator classes3.14 Looking ahead in an STL iterator requires an application of operator++, which in turn advances the iterator. In some cases l

2007-03-06 18:20:00 1251 1

原创 Head first design patterns c++实现, observer

//observer.h            observer interface#ifndef OBSERVER_H__#define OBSERVER_H__class Observer {public: Observer(){} virtual ~Observer(){} virtual void Update() = 0;private: Observer(const Obs

2007-03-05 18:15:00 642

原创 数据结构与算法分析课后习题第三章(5)

3.7 Modify the Vector class to add bounds checks for indexing.3.8 Add insert and erase to the Vector class.3.10 Modify the Vector class to provide stringent iterator checking by making iterator cl

2007-03-05 16:58:00 1155

原创 数据结构与算法分析课后习题第三章(4)

exercise 3.6 The Josephus problem is the following game: N people, numbered 1 to N, are sitting in a circle. Starting at person 1, a hot potato is passed. After M passes, the person holding the hot po

2007-03-05 16:25:00 1189

原创 Head first design patterns c++实现, strategy

看了Head first design patterns,就自己试着用c++实现了一下,例子都和书上的一样,照猫画虎,不知道行不行 :)//flybehavior.h//strategy#ifndef FLYBEHAVIOR_H___#define FLYBEHAVIOR_H___class FlyBehavior {public: virtual void Fly() = 0;}

2007-03-02 22:17:00 702

原创 数据结构与算法分析课后习题第三章(3)

Exercises 3.3 Implement the STL find routine that returns the iterator containing the first occurrence of x in the range that begins at start and extends up to but not include end. If x is not found,

2007-03-02 21:58:00 1915 1

原创 数据结构与算法分析课后习题第三章(2)

希望大家看过后对我自己写的这些笨方法提出意见,如果有问题也请及时指出,谢谢^^Exercise 3.2 Swap two adjacent elements by adjusting only the links ( and not the data ) usinga. Singly linked list.b. Doubly linked list //single.hpp#

2007-03-02 21:54:00 3350 1

原创 自己做的数据结构与算法分析(英文3版,weiss写的)的一些课后题

从第三章才开始做题,自己还是有些浮躁,以后看完要把会作的都做完再看下一章。练习3.1You are given a list, L, and another list P, containing integers sorted in ascending order. The operation printLots(L,P) will print the elements in L that a

2007-03-02 21:45:00 1896

原创 总结一下最近看设计模式的收获

最近看了strategy, observer, factory method, abstract factory, decorator, command, singleton, adaptor, facade这些模式,加上原来听的一些模式,可以说大概对设计模式有了个概念。总的说来我觉得设计模式的初衷就是提高维护的重用性,尽量使得客户代码不需要改变。在我看的这些模式中,除了facade之外,基本

2007-03-01 21:08:00 842

Probabilistic Graphical Models Part 3

Probabilistic Graphical Models 英文原版 part 3

2011-04-12

Probabilistic Graphical Models part2

Probabilistic Graphical Models 英文原版 part2

2011-04-12

Probabilistic Graphical Models Part1

Probabilistic Graphical Models 英文原版 part1

2011-04-12

pattern recognition 4th ed 模式识别英文版

pattern recognition 4th ed

2011-03-04

algorithms and theory of computation handbook vol.2

algorithms and theory of computation handbook

2011-03-04

algorithms and theory of computation handbook vol.1

algorithms and theory of computation handbook

2011-03-04

空空如也

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

TA关注的人

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