随笔分类 -  算法

摘要:Q. 有序表和无序表(Hash表)区别?Key有无序的区别。 Q. map 和 set 区别:有无伴随数据的区别。 有序表:红黑树、AVL树、size-banlance-tree、跳表都是有序表 哈希表:基础类型,值传递;非基础类,必须提供比较器,引用传递。 【经典题目】反转链表。要求实现单链表、双 阅读全文
posted @ 2025-09-15 21:32 番茄玛丽 阅读(6) 评论(0) 推荐(0)
摘要:为了便于测试,先写一个生成随机数组的方法。 1 pair<int*,int> GenerateRandomArray(int maxSize, int maxValue, int minValue) 2 { 3 //随机数组长度 4 const int len = rand()%maxSize+1; 阅读全文
posted @ 2022-11-30 15:34 番茄玛丽 阅读(89) 评论(0) 推荐(0)
摘要:位运算 Q1. 用位运算交换两个值 前提:要交换的两个值是独立内存 void Swap(int& a, int& b) { a = a ^ b; b = a ^ b; a = a ^ b; } Q2. 有一个数组,有些数字出现次数为偶数,只有一个数字出现次数为奇数,请在O(N)内找到这个数 解析:假 阅读全文
posted @ 2022-11-29 15:51 番茄玛丽 阅读(149) 评论(0) 推荐(0)
摘要:斗地主 棋牌游戏开发之地主AI算法实现 游戏中的AI算法总结与改进 斗地主AI算法——第一章の业务逻辑 通过枚举37种细分牌型,制作一个花色无关、顺序无关的字典 深度学习零基础,如何在 9 周内实战 CNN 斗地主机器人? 蚁群算法解决斗地主 C/C++打造——智能欢乐斗地主 斗地主策略说明 斗地主 阅读全文
posted @ 2018-07-15 22:16 番茄玛丽 阅读(704) 评论(0) 推荐(0)
摘要:Concepts: 1)combination of random and deterministic approaches 随机和确定性方法的组合 2)the concept of clustering 聚类的概念 3)the concept of a systematic evolution o 阅读全文
posted @ 2017-10-28 21:25 番茄玛丽 阅读(550) 评论(0) 推荐(0)
摘要:SFLA=SCE+PSO SCE: shuffled complex evolution algorithm(Duan 1992) = CRS(controlled radom search Price 1978)+Competive evolution(Holland 1975)+shufflin 阅读全文
posted @ 2017-09-19 20:04 番茄玛丽 阅读(8272) 评论(0) 推荐(0)
摘要:The first use of the term memetic algorithms in the computing literature appeared in work by Moscato (1989). He presented a heuristic that combined sim 阅读全文
posted @ 2017-09-19 16:46 番茄玛丽 阅读(1244) 评论(0) 推荐(0)
摘要:In mathematical programming, a heuristic refers to a procedure that seeks a solution to an optimization problem but does not guarantee that it will fin 阅读全文
posted @ 2017-09-19 13:52 番茄玛丽 阅读(846) 评论(0) 推荐(0)