摘要:
//赫夫曼树和赫夫曼编码。可运行代码#includeusing namespace std;typedef struct{ unsigned int weight; unsigned int parent,lchild,rchild;}HTNode,*HuffmanTree; ... 阅读全文
posted @ 2015-05-04 19:51
wy1290939507
阅读(237)
评论(0)
推荐(0)
摘要:
int 型数据的范围:-2^31~2^31-1(-2147483648~2147483647)unsigned int: 0~2^321.自己写的函数,注意特殊情况的考虑(c代码,基于char*类型)#include using namespace std;#include //包... 阅读全文
posted @ 2015-05-04 18:30
wy1290939507
阅读(253)
评论(0)
推荐(0)
摘要:
自己写的代码,未经测试////baidu实习岗在线测评////一组01的二进制字符串,要求不为逆序,需要交换几次位置。//#include #include using namespace std;typedef struct{ unsigned int num; vector data... 阅读全文
posted @ 2015-05-04 17:42
wy1290939507
阅读(227)
评论(0)
推荐(0)
摘要:
题目:A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the ... 阅读全文
posted @ 2015-05-04 12:37
wy1290939507
阅读(279)
评论(0)
推荐(0)

浙公网安备 33010602011771号