project1_3110103478
链表 

所属分类:VHDL/FPGA/Verilog
开发工具:Asm
文件大小:76KB
下载次数:9
上传日期:2014-04-28 20:34:31
上 传 者qqzjxdx
说明:  写一个名为”cleanup”的函数,它的输入参数有两个,第一个参数是一个普通单向链表(无头尾结点),第二个参数是一个整数。该函数的作用是清除链表中小于参数2的所有元素(等于的话是不清除的),然后返回链表的首个结点,不要创建新的存储空间,不能打乱元素的顺序。 链表中每个元素的大小为2 words,第一部分(First word)为数据域,记录数据;第二部分(Second word)为下个元素的地址。 空指针用0xFFFFFFFF表示,如果最后链表为空,则返回0xFFFFFFFF。 假设一开始链表非空。 不要调用到给定程序的那些标签段。 示例:给定链表为[15, 1, 12, 22, 9, 34, 27, 6],第二个参数为15,删除结点后链表为[15, 22, 34, 27],返回值为指向含有数据为15的那个结点的指针。
(Write a function called " cleanup" , which has two input parameters, the first parameter is a common way linked list (without head and tail node), the second argument is an integer. The role of the function is to clear the list of all the elements of less than 2 parameters (equal if not clear), and then returns a list of the first node, do not create new storage space, you can not upset the order of the elements. The size of each element in the list of 2 words, the first part (First word) for the data field, the record data the second part (Second word) address for the next element. Null pointer with 0xFFFFFFFF said that if the final list is empty, it returns 0xFFFFFFFF. Assuming a start list of non-empty. Do not call to a given program segment that label. Example: Given a list of [15, 1, 12, 22, 9, 34, 27, 6], the second parameter is 15, after deleting the node list is [15, 22, 34, 27], the return value contains data as a pointer pointing to that node 15.)

文件列表:
project1_3110103478.doc (118272, 2013-12-08)

近期下载者

相关文件


收藏者