联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数据结构(145) 
按平台查找All C/C++(145) 

[数据结构] 八皇后

回溯算法,递归算法。八皇后一般指八皇后问题。八皇后问题(英文:Eight queens),是由国际西洋棋棋手马克斯·贝瑟尔于1848年提出的问题,是回溯算法的典型案例。问题表述为:在8×8格的国际象棋上摆放8个皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上,问有多少种摆法。
backtracking algorithm (2020-09-07, C/C++, 12KB, 下载2次)

http://www.pudn.com/Download/item/id/1599478275379169.html

[数据结构] 未命名1

插入排序是一种简单直观且稳定的排序算法。如果有一个已经有序的数据序列,要求在这个已经排好的数据序列中插入一个数,但要求插入后此数据序列仍然有序,这个时候就要用到一种新的排序方法——插入排序法,插入排序的基本操作就是将一个数据插入到已经排好序的有序数据中,从而得到一个新的、个数加一的有序数据,算法适用于少量数据的排序,时间复杂度为O(n^2)。是稳定的排序方法。
Insertion sort is a simple, intuitive and stable sort algorithm. If there is an orderly data sequence, the requirements in this has been inserted into a row of good data sequence number, but still request after inserting the data sequence order, this time using a new method for sorting, insertion sort, insertion sort of basic operation is to insert a data into the already sorted data, in order to get a new number, plus one of ordered data, method is applicable to a small amount of data sorting, time complexity is O (n ^ 2). It's a stable sorting method. (2019-08-08, C/C++, 1KB, 下载0次)

http://www.pudn.com/Download/item/id/1565225492113290.html

[数据结构] k-means

利用欧式距离对数据进行聚类, (D指的是包含所有元素的集合) 1、从D中随机取k个元素,作为k个簇的各自的中心。 2、分别计算剩下的元素到k个簇中心的相异度,将这些元素分别划归到相异度最低的簇。 3、根据聚类结果,重新计算k个簇各自的中心,计算方法是取簇中所有元素各自维度的算术平均数。 4、将D中全部元素按照新的中心重新聚类。 5、重复第4步,直到聚类结果不再变化。
Clustering Data Using Euclidean Distance (2019-05-28, C/C++, 2KB, 下载1次)

http://www.pudn.com/Download/item/id/1559046644902146.html

[数据结构] MGraph(邻接矩阵)

数据结构 图 邻接矩阵表示法的基本思想是引入两个数组:一个用于记录图中各个顶点信息的一维数组,称为顶点表;另一个用于图中各个顶点之间关系的二维数组,称为邻接矩阵。 为了访问一张图中的数据,需要遍历一张图,与其他结构不同,图是多对多的结构,所以要避免在图中的无限循环,这里,加上一个visited数组,里面的元素表示着节点的访问情况,对应数据为0,表示未访问,对应为1,表示已访问,根据访问规律的不同,有深度优先遍历和广度优先遍历。
DataStructure MGraph (2018-09-05, C/C++, 5KB, 下载0次)

http://www.pudn.com/Download/item/id/1536107941315477.html

[数据结构] 源代码

利用图状结构存储数据,并实现迪杰斯特拉算法来求解最短路径。 用带权的有向图表示一个交通运输网,图中: 顶点——表示城市 边——表示城市间的交通联系 权——表示此线路的长度或沿此线路运输所花的时间或费用等 问题:从某顶点出发,沿图的边到达另一顶点所经过的路径中,各边上权值之和最小的一条路径——最短路径。
The graph structure is used to store data and the Dijkstra algorithm is used to solve the shortest path. A weighted transport directed graph is used to represent a transportation network. Vertex - a city Edge - the traffic links between cities Right -- indicating the length of the line or the time or cost of transportation along the line. Problem: from a certain point, the shortest path is the path with the lowest weight on every side of the path along the edge of the graph reaching the other vertex. (2018-05-08, C/C++, 5KB, 下载1次)

http://www.pudn.com/Download/item/id/1525766969793386.html

[数据结构] 8592-KMP算法

实现KMP算法。KMP算法是一种改进的字符串匹配算法,由D.E.Knuth,J.H.Morris和V.R.Pratt同时发现,因此人们称它为克努特--莫里斯--普拉特操作(简称KMP算法)。
Implement the KMP algorithm. KMP algorithm is an improved string matching algorithm. It is discovered by D.E.Knuth, J.H.Morris and V.R.Pratt simultaneously. Therefore, it is called Knut Maurice Platt operation. (2018-03-19, C/C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/1521434460632472.html

[数据结构] 运算器

设计实现一个简单的计算器,可以接受中缀数值表达式,并进行求值。 至少应该包括加、减、乘、除4种运算和括号处理; (2) 运算量可以自己约束(整数、实数等); (3)有能力的同学可以仿照WINDOWS计算器界面
The design and implementation of a simple calculator, can accept infix numerical expression, and evaluation. At least 4 additional operations, including adding, subtraction, multiplication, and division, should be included; (2) the amount of computation can be bound by itself (integer, real number, etc.); (3) able students can copy the WINDOWS calculator interface (2017-07-10, C/C++, 1KB, 下载3次)

http://www.pudn.com/Download/item/id/1499691573694311.html

[数据结构] EightQueen

八皇后问题,是一个古老而著名的问题,是回溯算法的典型案例。该问题是国际西洋棋棋手马克斯·贝瑟尔于1848年提出:在8X8格的国际象棋上摆放八个皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上,问有多少种摆法。 高斯认为有76种方案。1854年在柏林的象棋杂志上不同的作者发表了40种不同的解,后来有人用图论的方法解出92种结果。计算机发明后,有多种计算机语言可以解决此问题。
Eight Queen (2015-03-22, C/C++, 1KB, 下载5次)

http://www.pudn.com/Download/item/id/1427037257658323.html

[数据结构] FIFO-algorithm

先入先出队列,这是一种传统的按序执行方法,先进入的指令先完成并引退,跟着才执行第二条指令。是一种先进先出的数据缓存器,他与普通存储器的区别是没有外部读写地址线,这样使用起来非常简单,但缺点就是只能顺序写入数据,顺序的读出数据,其数据地址由内部读写指针自动加1完成,不能像普通存储器那样可以由地址线决定读取或写入某个指定的地址
First-in, first-out queue, which is a traditional sequential execution method, first enter the command to complete and retire, followed by the second instruction before it is implemented. Is a FIFO data buffer, and he is the difference between ordinary no external memory write address lines, so it is very simple, but the disadvantage is that the order can only write data, read data sequentially, the data address by the internal write pointer is automatically incremented to complete, not like ordinary memory address lines that can be read from or written to a decision to the address specified (2013-06-07, C/C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/2272608.html

[数据结构] joseph

约瑟夫问题(有时也称为约瑟夫斯置换,是一个出现在计算机科学和数学中的问题。在计算机编程的算法中,类似问题又称为约瑟夫环。又称“丢手绢问题”)。
Joseph problems (sometimes called Josephus replacement, is an appearance in computer science and mathematics problems in computer programming algorithm, similar problems also known as Joseph ring known as the " Diushou Juan Problems" ). (2013-05-22, C/C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/2253961.html

[数据结构] 2

掌握二叉树的链式和顺序存储结构,利用队列对二叉树进行运算。 二、实验内容: 1) 编写函数creatbt,其功能是将一维数组方式存储的二 叉树转化为链式存储的二叉树,返回root指针。 2) 编写函数freebt,其功能是释放二叉树链表节点的存储 空间。函数原型为:void freebt (TNODE * root) 3) 编写函数实现前序、中序和后序遍历;
Master chain and sequential storage structure of the binary tree using a queue to operate the binary tree. Experimental content: 1) write function creatbt, its function is one-dimensional array stored binary tree into a chain store binary tree to return to the root pointer. 2) write functions freebt, and its function is to release binary tree list node storage space. The function prototype: void freebt (TNODE* root) 3) write functions preorder, inorder and postorder traversal (2013-04-06, C/C++, 1KB, 下载3次)

http://www.pudn.com/Download/item/id/2188013.html

[数据结构] main

  约瑟夫斯(Josephus)问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数上限值m,从第一个人开始按顺时针方向自1开始报数,报到m时停止报数。报m的人出列,将他的密码作为新的m值,从他在顺时针方向下一个人开始重新从1报数,如此下去,直至所有的人全部出列为止。试设计一个程序,按出列顺序印出各人编号。
Josephus (Josephus) a description of the problem: the number 1,2, ..., n n people sit in a circle in a clockwise direction, the person holding a password (a positive integer). Beginning optionally a positive integer as the upper limit of m in the reported number, starting from the first person clockwise direction since a reported number, the report m stop the reported number. The reported m dequeue his password as the new value of m from the next person clockwise to start again from 1 number off, it goes on, until all of the people all of the columns so far. Try to design a program to print out each number dequeue order. (2012-09-22, C/C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/1999281.html

[数据结构] Discrete-Mathematics-report(2)

1. 求有限集上给定关系的自反、对称和传递闭包。(有两种求解方法,只做一种为A,两种都做为B) 2. 求有限集上等价关系的数目。(有两种求解方法,只做一种为A,两种都做为B) 3. 求解商集,输入集合和等价关系,求相应的商集。(C) 注意:题目类型分为A,B,C三类,其中A为基本题,完成A类题目可达到设计的基本要求,其他均为加分题,并按字母顺序分数增加越高。
A demand for a given finite set of reflexive, symmetric and transitive closure. (There are two solution method, only one is A, two are used as B) Find the number of equivalence relations on a finite set. (There are two solution method, only one is A, two are used as B) 3 Solving the quotient set of input sets and equivalence relations, find the corresponding quotient set. (C) Note: topic types are divided into three categories A, B, C, where A is the basic question, to complete the Class A subject to meet the design requirements, the other are the bonus, in alphabetical order the higher the score increases. (2012-03-12, C/C++, 757KB, 下载5次)

http://www.pudn.com/Download/item/id/1791450.html

[数据结构] a

输入某年某月某日,判断这一天是这一年的第几天? 程序分析:以3月5日为例,应该先把前两个月的加起来,然后再加上5天即本年的第几天,特殊       情况,闰年且输入月份大于3时需考虑多加一天。
Input of a certain period of a day, this day is to determine the first few days this year? Program analysis: the March 5, for example, should the first two months combined, then add five days this year- the first few days, special circumstances, enter the month and leap year to be considered when more than 3 one day. (2011-10-14, C/C++, 3KB, 下载2次)

http://www.pudn.com/Download/item/id/1668451.html

[数据结构] Josephus--problem

约瑟夫斯(Josephus)问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数上限值m,从第一个人开始按顺时针方向自1开始报数,报到m时停止报数。报m的人出列,将他的密码作为新的m值,从他在顺时针方向下一个人开始重新从1报数,如此下去,直至所有的人全部出列为止。试设计一个程序,按出列顺序印出各人编号。
Josephus (Josephus) a description of the problem are: number 1,2, ..., n of n individuals sitting around a circle clockwise, each holding a password (positive integer). Choose a positive integer beginning as a limit on the number of reported m, starting from the first person to start a clockwise direction from a report number, report the number of reported m stop. Who reported m out of line, his password as the new m value, in a clockwise direction from the next person he began to re-reported from a number, it goes on until all the people all of the columns so far. Design a program, according to the column order prints each number. (2011-10-07, C/C++, 56KB, 下载4次)

http://www.pudn.com/Download/item/id/1662264.html

[数据结构] 025

配料员 背景 你是一名室内装潢工程队的配料员。你的伙伴们在铺大理石地砖的时候,习惯于按照以下两种之字形的遍历顺序之一:学了 C 语言以后,你决定编写一个程序。无论你的伙伴们想要以何种遍历顺序铺设任何图案的任何大小的地砖方阵,你的程序都能正确地生成一个线性遍历序列,指示你每次该递给他们什么图案的地砖。 输入 首行为需要遍历的地砖矩阵的个数。第二行为第一个矩阵的维数(其中的 x 是小写字母 x,前后各有一个空格)。如果是一个 N 维的矩阵,则接下来的 N 行每一行为矩阵该行各列的元素,整型,以空格分隔,每一个整数代表一种基本图案的地砖。随后的一行为该矩阵遍历的模式,只能为 TL-BR 或者 TR-BL 两者之一。若有多个矩阵,则从下一行起重复上述的输入模式。 输出 按顺序输出所需原料的编号。
Ingredients Members Background You are a interior decorating project team members of the ingredients. Your partners in the marble tiles when used in accordance with the following two zigzag traversal order of: (2011-09-22, C/C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/1651773.html

[数据结构] insertsort

插入排序算法1.for 循环找出一个待比较的值,然后进入while循环中,与数组中下标比它小的数据进行比较, * 因为下标比它小的数据都是排好序的,当a[i]大于这个数时,将a[i]往后移一下,就是这个数 * 的下标加1,依次循环,将比这个数的的数都移动到此数的后面,假如:当执行i--后,while条件 * 不成立,从而退出了while循环,此时,下标为i的数组值小于这个标准数,所以将这个标准数放到 * 下标为i+1的数组中。当for循环结束时,此数组中的所有元素都是有序的
Insertion Sort algorithm to find a 1.for cycle value to be compared, and then enter a while loop, and the array subscript smaller than its comparison of data,* because it is smaller than under the standard data are sorted, When a [i] greater than this number, it will be a [i] backward look, that is, the number of* the subscript plus 1, followed by cycle, than the number of the numbers are moving back to this number, if : When running i- later, while condition* is not set up to exit the while loop, this time, the subscript i in the array is less than the standard number, so the number of this standard into* the subscript i+1 array. When the for loop ends, all the elements in this array are ordered (2011-08-25, C/C++, 1KB, 下载4次)

http://www.pudn.com/Download/item/id/1630497.html

[数据结构] dynamic-planning

给定n个矩阵{A1,A2,…,An},其中Ai与Ai+1是可乘的,i=1,2,…,n-1。考察这n个矩阵的连乘积A1A2…An。由于矩阵乘法满足结合律,故计算矩阵的连乘积可以有许多不同的计算次序,这种计算次序可以用加括号的方式来确定。
Given n matrices {A1, A2, ..., An}, where Ai and Ai+1 is a mere of, i = 1,2, ..., n-1. Study the n matrix with the product A1A2 ... An. Since matrix multiplication to meet with law, so the calculation of the matrix with the product can have many different ways to calculate the order, the order of this calculation can be used to determine the way in parentheses. (2011-06-23, C/C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/1577697.html

[数据结构] feidigui_bianli_BiTree

建立一棵链表表示的二叉树,然后采用非递归先序访问二叉树,具体用一个指针栈(数组)来实现,且其最大容量为maxsize=50,二叉树根指针为T,若一个结点的左孩子和右孩子均为空,则为叶子结点,计数器加一,直到访问结束。
Binary tree expressed in the establishment of a linked list, and then visit the first-order non-recursive binary tree, specifically with a pointer to the stack (array) to achieve, and its maximum capacity of maxsize = 50, a binary tree the root pointer for the T If a node' s left child and right child are empty, for the leaf nodes, the counter plus one, until the end of the visit. (2009-08-31, C/C++, 12KB, 下载3次)

http://www.pudn.com/Download/item/id/896089.html

[数据结构] out_sort

外部排序程序,foxpro的DBF文件中某个字段的程序,特点是可以指定排序内存大小,但可以排序超级大的文件远远超出机器内存,采用快速排序加失败树合并算法,排序中会产生很多临时小文件。修改后可用于任何文件字段排序。
External sort procedure, foxpro of DBF files in a field procedure, and there is a sort of memory you can specify the size, but you can sort super large files far beyond the machine memory, the use of quick sort algorithm plus the failure of the merger tree, sorting will produce many temporary small files. The revised document can be used for any sort by that field. (2008-09-18, C/C++, 10KB, 下载21次)

http://www.pudn.com/Download/item/id/548516.html
总计:145