登录
首页 » Visual C++ » pinfanfangwen

pinfanfangwen

于 2015-01-15 发布 文件大小:1KB
0 212
下载积分: 1 下载次数: 11

代码说明:

  设有一头指针为L的带有表头结点的非循环双向链表,其每个结点中除有prev(前驱指针),data(数据)和next(后继指针)域外,还有一个访问频度域freq。在链表被起用前,其值均初始化为零。每当在链表中进行一次Locate(L,x)运算时,令元素值为x的结点中freq域的值增1,并使此链表中结点保持按访问频度非增(递减)的顺序排列,同时最近访问的结点排在频度相同的结点的最后,以便使频繁访问的结点总是靠近表头。试编写符合上述要求的Locate(L,x)运算的算法,该运算为函数过程,返回找到结点的地址,类型为指针型。(Has a head pointer is non-circular doubly linked list L with a header node, each node in addition to prev (precursor pointer), data (data) and next (successor pointers) outside, there is an access frequency degree domain freq. Before the list was hired, their values are initialized to zero. Whenever carried out in the list once Locate (L, x) when the operation, so that the element node x is the value in freq domain by one, and keep this list in the node-access frequency of non-increasing (decreasing) the order, while a recent visit to the nodes in the same row of the frequency of the last node, so that the nodes are frequently accessed tables are always near the head. Locate (L, x) algorithm is prepared in accordance with the above requirements of the test operation, the operation as a function of the process, return to find the address of the node of type pointer.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • beipaowenti
    背包算法的c++简单实现,很有用的,可以看看(Knapsack algorithm)
    2012-04-10 19:32:41下载
    积分:1
  • Lecture6
    数据结构中链式队列和堆栈的循环用法,非常有用(Queue data structure in the chain and the cycle stack usage, very useful)
    2011-07-27 15:30:29下载
    积分:1
  • process_schedule
    演示进程调度算法 使用的链表 包涵7个功能 4个算法(Process Scheduling Algorithm Demo )
    2011-12-24 10:52:17下载
    积分:1
  • hanoi
    实现汉诺塔的操作步骤输出,可以设置1,2,3三个塔柱,输出结果为用1,2,3表示的操作(Tower of Hanoi the steps to achieve the output, you can set 1,2,3 3 Pylon, the output result of the operation that used 1,2,3)
    2009-12-05 22:11:52下载
    积分:1
  • lvxingshang
    一个经典的旅行商问题源码,不是最优解,只是一种 思路(A classic traveling salesman problem source is not the optimal solution, just a thought)
    2012-11-09 01:33:02下载
    积分:1
  • list-and-array
    数组的定义与使用,数组的运算,字符串的输入与输出,冒泡排序(list and array)
    2013-10-17 11:32:30下载
    积分:1
  • sort
    数据结构中数据的排序示例,包括堆排序、快速排序等(Data structure to sort the data sample, including the heap sort, quick sort, etc.)
    2008-06-14 20:52:24下载
    积分:1
  • zhaose
    本代码是通过C语言来实现贪心算法求着色问题,包括具体问题和实现代码(This code is the C language to implement the greedy algorithm for the coloring problem, including specific issues and the implementation code)
    2013-09-23 16:04:24下载
    积分:1
  • ysph
    约瑟夫环,数据结构算法,挺有意思,看看,看看(ysphdfgfgf)
    2009-03-14 00:16:15下载
    积分:1
  • Huffman
    数据结构,利用霍夫曼树实现文本数据的压缩。(Huffman data compression and decompression.)
    2014-01-28 18:25:24下载
    积分:1
  • 696518资源总数
  • 106253会员总数
  • 14今日下载