登录
首页 » C/C++ » sLinkList

sLinkList

于 2020-11-04 发布
0 463
下载积分: 1 下载次数: 13

代码说明:

说明:  项目任务 在单链表类中增加一个功能erase(x, y), 删除表中所有值在 [x, y] 之间的结点。假设链表中结点数值类型是整形,要求编程返回删除相应结点后的链表长度和链表元素。 输入描述 第一行输入链表List的结点元素值,元素之间用空格间隔,且均为int类型; 第二行输入为x和y,分别表示需要删除结点元素的最小值和最大值。 输出描述 第一行输出删除相应结点后链表的长度; 第二行输出删除相应结点后链表的所有元素,元素之间用空格间隔。若无剩余元素,输出null。(Project tasks A function erase (x, y) is added to the class of single linked list to delete all nodes whose values are between [x, y]. Assuming that the numerical type of the node in the linked list is plastic, the program is required to return the length and elements of the linked list after deleting the corresponding nodes. Enter a description In the first line, enter the node element values of the linked list list, with spaces between the elements, and all of them are of type int; In the second line, input X and y to indicate the minimum and maximum values of node elements to be deleted. Output description The first line outputs the length of the linked list after deleting the corresponding node; The second line outputs all the elements of the linked list after deleting the corresponding nodes, with space between the elements. If there are no remaining elements, null is output.)

文件列表:

qwer\main.cpp, 671 , 2020-11-04
qwer\sLinkList.cpp, 614 , 2020-11-04
qwer\sLinkList.h, 234 , 2020-11-04
qwer, 0 , 2020-11-04

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

发表评论

0 个回复

  • 696518资源总数
  • 104271会员总数
  • 57今日下载