-
C语言实现的寻找多数元素代码
C语言实现的寻找多数元素代码,含英文注释。算法采用《算法设计技巧与分析》(沙特)一书上的方法。在一个整数序列A中,如果整数r在A中出现的次数大于序列A的一半,那么我们把这个r称为多数元素。如何更快的找出这个元素呢?在原序列中去除两个不同的元素后,那么在原序列中的多数元素在新序列中还是多数元素。
- 2022-11-30 03:55:03下载
- 积分:1
-
一个计算SIN X的函数,觉得算法还可以
一个计算SIN X的函数,觉得算法还可以-a calculation SIN X function, algorithm can also think! !
- 2023-01-29 02:45:03下载
- 积分:1
-
1背包问题 可以提供在背包方面遇到问题的学生或者有需要的人....
0-1背包问题 可以提供在背包方面遇到问题的学生或者有需要的人.-0-1 knapsack problem can provide a backpack problems encountered students or those who are in need.
- 2023-04-08 08:35:03下载
- 积分:1
-
Procedures to achieve a single
程序实现了带表头单链表的最基本操作,包括创建链表,查询数值,插入结点,删除结点,链表分解,将单链表变为循环链表。并附有详细的注释和实验报告。-Procedures to achieve a single-list header with the most basic operation, including the creation of list, query value, insert node, delete node, chain decomposition, into a single cycle of list list. Together with detailed notes and experimental reports.
- 2022-08-11 22:27:24下载
- 积分:1
-
这是一个旅行商问题的算法源程序,代码较为简短,说明详细,可读性好。压缩包里面只包含源程序文件,要在vc上面运行。...
这是一个旅行商问题的算法源程序,代码较为简短,说明详细,可读性好。压缩包里面只包含源程序文件,要在vc上面运行。-This is a traveling salesman problem algorithm source code, code brief that detailed and readable. Compressed they contain only source files to run above the vc.
- 2022-03-20 12:32:44下载
- 积分:1
-
这是我的第一个软件。
this is my first software.
- 2022-12-15 17:50:04下载
- 积分:1
-
Shortest Path 2 is the data structure of knowledge but the procedures are a litt...
最短路径2 是有关数据结构的知识 但是程序稍稍有一个小小的失误-Shortest Path 2 is the data structure of knowledge but the procedures are a little bit errors
- 2023-01-02 17:10:03下载
- 积分:1
-
非常完美地二叉搜索树模板~~~~ 希望大家能够喜欢,并且提出宝贵意见和建议...
非常完美地二叉搜索树模板~~~~ 希望大家能够喜欢,并且提出宝贵意见和建议-perfectly Binary Search Tree template ~ ~ ~ ~ hope that we can love and made valuable suggestions and recommendations
- 2023-06-02 12:30:04下载
- 积分:1
-
遗传算法C
很好用的c
注:前两个文件存储为m文件并放在工作目录下,运行结果为
p =
0.0000 -0.0000 0.0055
大家可以直接绘出f(x)的图形来大概看看f(x)的最值是多少,也可是使用优化函数来验证。matlab命令行执行命令:
fplot("x+10*sin(5*x)+7*cos(4*x)",[0,9])
evalops是传递给适应度函数的参数,opts是二进制编码的精度,termops是选择maxGenTerm结束函数时传递个maxGenTerm的参数,即遗传代数。xoverops是传递给交叉函数的参数。mutops是传递给变异函数的参数。
- 2023-05-18 06:50:04下载
- 积分:1
-
用VC加ADO操作ACCESS数据库,很好的例子!采用文档视图界面,其中CListcTrl控件应用于数据的显示上,方法灵活恰当,很值得一看。...
用VC加ADO操作ACCESS数据库,很好的例子!采用文档视图界面,其中CListcTrl控件应用于数据的显示上,方法灵活恰当,很值得一看。-increase ADO VC operation ACCESS database, a good example! Using documents View interface, which controls applied CListcTrl data showed that the methods appropriate, it is worth looking at.
- 2023-03-12 13:15:03下载
- 积分:1