datastructure专题

【BigHereo 44】---DataStructure---队列(二)

Datastructure---队列   一,【前言】        前面我们说到,数据结构中,有线性和非线性的,今天我们主要来总结一下线性结构---队列. 了解队列,我们先从几个简单问题入手:    (1)顺序表查的效率高吗?    (2)循环队列中,实际队列长的怎么算?    (3)常用循环语句有哪些?    (4)数据项和数据元素有什么

DataStructure.时间和空间复杂度

时间和空间复杂度 【本节目标】1. 如何衡量一个算法的好坏2. 算法效率3. 时间复杂度3.1 时间复杂度的概念3.2 大O的渐进表示法3.3 推导大O阶方法3.4 常见时间复杂度计算举例3.4.1 示例13.4.2 示例23.4.3 示例33.4.4 示例43.4.5 示例53.4.6 示例63.4.7 示例7 4.空间复杂度4.1 示例14.2 示例24.3 示例3 【本节

DataStructure_5.String

5.1 5.1.1 串即字符串,由零个或多个字符组成的有限(有限指串的长度n是有限数值)序列,一般记为s="a1a2a3…an"(n≥0),注意引号不属于串的内容ai(1≤i≤n)可以是字母,数字或其他字符,i就是该字符在串中的位置。n称为串的长度。零个字符的串称为空串(null string),长度为零,可以直接用双引号表示"""",也可以用空集符号Ф表示,串的相邻字符之间具有前驱与后继的关系

DataStructure_4.Stack Queue

4.1 栈的定义 4.1.1 限定仅在表层进行插入和删除操作的线性表。允许插入和删除的的一端称为栈顶,另一端称为栈底,不含任何数据元素的栈称为空栈。栈可以形象地表述为后进先出(Last In First Out)的线性表,简称LIFO结构。 需要明白的是,栈结构只是限定了线性表插入和删除的位置必须在栈顶,但没有对元素进出的时间做限制,只需要保证是栈顶元素出栈就行。 例如:将a,b,c依次压入

DataStructure_3.List

3.1线性表是有限序列 元素之间是有顺序的,每个元素至多有一个前驱一个后继,首元素无前驱,尾元素无后继在较复杂的线性表里面,一个数据元素可以由若干数据线组成(就比如说花名册,一个学号对应一个学生,符合元素之间的顺序性,但是每个学生名字后面还可以有很多项信息,比如成绩,爱好什么的)线性表常用的几个操作:重置为空表、插入数据、删除数据、查找元素、获取线性表长度。 例题: 将所有的在线性表Lb中但

DataStructure_2.Algorithm

2.1 算法(是解决特定问题求解步骤的描述)在计算机中表现为指令的有限序列,并且每条指令表示一个或多个操作。 2.2 算法五个基本特征{输入,输出,有穷性,确定性,可行性} 2.2.1 输入输出:算法至少有0个输入,必须有输出。 2.2.2 有穷性:算法在执行有限的步骤后,自动结束而不会出现死循环,且每一个步骤在可接受的时间内完成。 2.2.3 确定性:算法的每一个步骤都有确定的意

【DataStructure】Implemantation of Binary Tree

Statements: This blog was written by me, but most of content  is quoted from book【Data Structure with Java Hubbard】  Here is a class for binary trees that directly implements the recursive defin

【DataStructure】Description and Introduction of Tree

【Description】 At ree is a nonlinear data structure that models a hierarchical organization. The characteristic eatures are that each element may have several successors (called its “children”) and ev

【DataStructure】Another usage of Map: Concordance

Statements: This blog was written by me, but most of content  is quoted from book【Data Structure with Java Hubbard】  【Description】 Aconcordanceis a list of words that appear in a

【DataStructure】Another usage of List: Polynomial

Statements: This blog was written by me, but most of content  is quoted from book【Data Structure with Java Hubbard】  【Description】 Apolynomialis a mathematical function of the form:

【DataStructure】 Classical Question: Josephus Cycle

【Description】   This problem is based upon a report by the historian Joseph ben Matthias (Josephus) on the outcome of a suicide pact that he had made between himself and 40 soldiers as they were besi

【DataStructure】Descriptioin and usage of List

Statements: This blog was written by me, but most of content  is quoted from book【Data Structure with Java Hubbard】  【Description】 Alistis a collection of elements that are accessible sequentiall

【DataStructure】Description and usage of queue

【Description】 A queue is a collection that implements the first-in-first-out protocal. This means that the only accessiable object in the collection in the first one that was inserted. The most commo

算法动态演示http://cst.hit.edu.cn/datastructure/teachassist/suanfadongtaiyanshi.php

您的位置:主页>>网上课堂>>算法动态演示  《数据结构与算法》算法动态演示目录 数据结构与算法 第一章 绪论 第二章 算法及其性能度量 第三章 线性表  线性表数组存储  数组线性表中插入元素  数组线性表中插入元素的算法实现  数组线性表中删除元素  数组线性表中删除元素的算法实现  线性表指针存储  指针线性表中插入元素  指针线性表中插入元素的算法实

DataStructure-9-排序技术

9.1 排序技术 9.1.1 概念 9.1.1  正序,逆序      若待排记录序列中的记录已按关键码排好序,称此记录序列为正序;若待排序序列中记录的排列顺序与排好序的顺序正好相反,称此记录序列为逆序(反序). 9.1.2 趟     在排序过程中,将待排序的记录序列扫描一遍称为一趟 9.1.4 排序算法的稳定性       9.1.5 排序的分类

DataStructure课设日记

"哎呀~~,明天数据结构的课设就开始啦。" 2019-01-13 19:06:45 多云 上次的面向对象课设可谓是给我的心灵带来了极大的创伤,所以这次一定要做好了准备才行,首先就是千万不要生病。想想我就头疼,一旦感冒那就不太可能在这么高强度的课设下恢复了,所以Reno你一定要照顾好你自己啊,那俗话说得好,身体才是革命的本钱嘛。不管是风是雨,只要你迎头上,就算是一把鼻涕一把泪滴,那只要能把山头