-
sLinkList
说明: 项目任务
在单链表类中增加一个功能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.)
- 2020-11-04 16:54:25下载
- 积分:1
-
实验一
说明: 一般信道容量迭代算法
(1)初始化信源分布:P^((0))=(p_(1 ),p_(2 ),…,p_(i ),…,p_r),置迭代计数器k=0,设信道容量相对误差门限为δ,δ>0,可设C(0)=-∞;
(2)φ_ji^((k))=(p_ij p_i^((k)))/(∑p_ij p_i^((k)) ) i=1,…,r;j=1,…,s;
(3)p_i^((k+1) )=exp?[∑_j?〖p_ij lnφ_ji^((k)) 〗]/(∑_i?〖{exp?[∑_j?〖p_ij lnφ_ji^((k)) 〗]}〗) i=1,…,r;
(4)C^((k+1))=ln∑_i?〖{exp?[∑_j?〖p_ij lnφ_ji^((k)) 〗]}〗;
(5)如果,
(|C^((k+1) )-C^((k)) |)/C^((k+1)) ≤δ,
转向(7);
(6)否则,置迭代符合 k+1→k,转向(2);
(7)输出p_i^((k+1) )和C^((k+1));
(8)停止。(General channel capacity iterative algorithm)
- 2020-05-21 14:30:04下载
- 积分:1
-
FragmentNavigation
fragment 应用示例,以微信界面为例
- 2013-11-04 09:37:56下载
- 积分:1
-
演化博弈MATLAB
说明: 有关博弈的matlab程序,可直接使用,方便快捷(About the game matlab program)
- 2019-01-14 12:41:18下载
- 积分:1
-
CListCtrl可以有多种风格,这次我用ICON类型来作一个例子程序,ICON加上文字简直COOL极了...
CListCtrl可以有多种风格,这次我用ICON类型来作一个例子程序,ICON加上文字简直COOL极了-CListCtrl can have many styles, I use this type of ICON as an example of procedures, ICON words simply add a very COOL
- 2022-03-19 08:09:00下载
- 积分:1
-
pro1
使用Qt开发的秒表功能,有开始,暂停,置0三个按钮,有相应的表盘与LCD显示。(Using the stopwatch function developed by Qt, there are three buttons: start, pause, set 0, and corresponding dial and LCD display.)
- 2018-09-04 14:56:11下载
- 积分:1
-
GA-BPNN完整实例
GA_BPNN,里面有详细的代码和注释,能够很快入手,值得推荐!(LG_BPNN use and annotations, with detailed code and comments
study quickly
it is recommended!)
- 2020-12-24 18:19:05下载
- 积分:1
-
DPSO
说明: 离散的PSO算法解决0-1背包问题,比传统的PSO效果更好(Discrete PSO algorithm solves the 0-1 knapsack problem)
- 2021-04-14 15:48:55下载
- 积分:1
-
under watt32 Dos capture, realize the firewall, tcp reconstruction
watt32 Dos下的抓包,实现防火墙,tcp重建
-under watt32 Dos capture, realize the firewall, tcp reconstruction
- 2022-05-06 14:40:25下载
- 积分:1
-
pam
simulink实现载波PAM信号传输并计算不同信噪比下的误码率(PAM Modulation In Simulink)
- 2012-11-25 10:27:00下载
- 积分:1