当前位置: 首页 > news >正文

广西翔路建设有限责任公司网站常见的网络推广方法有哪些

广西翔路建设有限责任公司网站,常见的网络推广方法有哪些,基于jsp的购物网站开发,上海手机软件开发公司目录 前言 已完成内容 归并排序实现 01-开发环境 02-文件布局 03-代码 01-主函数 02-头文件 03-PSeqListFunction.cpp 04-SortFunction.cpp 结语 前言 此专栏包含408考研数据结构全部内容,除其中使用到C引用外,全为C语言代码。使用C引用主要是…

目录

前言

已完成内容

归并排序实现

01-开发环境

02-文件布局

03-代码

01-主函数

02-头文件

03-PSeqListFunction.cpp

04-SortFunction.cpp

结语


前言

        此专栏包含408考研数据结构全部内容,除其中使用到C++引用外,全为C语言代码。使用C++引用主要是为了简化指针的使用,避免二重指针的出现。

已完成内容

[数据结构]:01-顺序表(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:02-单链表(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:03-栈(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:04-循环队列(数组)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:05-循环队列(链表)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:06-队列(链表带头结点)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:07-二叉树(无头结点)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:08-顺序查找(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:09-二分查找(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:10-二叉排序树(无头结点)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:11-冒泡排序(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

 [数据结构]:12-快速排序(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:13-插入排序(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:14-选择排序(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

[数据结构]:15-堆排序(顺序表指针实现形式)(C语言实现)_Chandni.的博客-CSDN博客

归并排序实现

01-开发环境

        语言:C/C++14

        编译器:MinGW64

        集成开发环境:CLion2022.1.3

02-文件布局

        请在CLion集成开发环境中创建C++可执行程序,否则无法运行,原因上面已解释。

                        ​​​       

03-代码

01-主函数

        用于测试归并排序。

// 顺序表以指针形式实现(申请堆空间,可动态控制顺序表大小)--数组实现形式不可以动态控制顺序表大小
#include "./Head/PSeqSearchData.h"
#include "./Source/PSeqListFunction.cpp"
#include "./Source/SortCommon.cpp"
#include "./Source/SortFunction.cpp"int main() {// 顺序表初始化PSeqList PSL;PSeqListCreate(PSL, MaxSize);PSeqListPrint(PSL);// 调试内容
//    int Array[] = {2, 3, 1, 5, 1, 10};memcpy(PSL.data, Array, sizeof(Array));
//    PSL.data = Array;
//    PSL.ListLength = 6;// 归并排序// end--表示数组中最后一个元素位置(Length - 1)MergeSort(PSL.data, 0, PSL.ListLength - 1);PSeqListPrint(PSL);return 0;
}

02-头文件

        用于存储结构体和常量等。

//
// Created by 24955 on 2023-03-02.
// 顺序表以指针形式实现(申请堆空间,可动态控制顺序表大小)-数组实现形式不可以动态控制顺序表大小
//#ifndef INC_01_SEQUENCESEARCH_PSEQSEARCHDATA_H
#define INC_01_SEQUENCESEARCH_PSEQSEARCHDATA_H
// 头文件
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>// 常量
#define MaxSize 10
typedef int ElemType;// 结构体
// 顺序表结构体(以指针形式实现)
typedef struct {ElemType *data;int ListLength;
}PSeqList;
#endif //INC_01_SEQUENCESEARCH_PSEQSEARCHDATA_H

03-PSeqListFunction.cpp

        用于存储顺序表初始化和打印输出等函数。

//
// Created by 24955 on 2023-03-02.
// 顺序表以指针形式实现(申请堆空间,可动态控制顺序表大小)--数组实现形式不可以动态控制顺序表大小
// 不使用哨兵
//
// 顺序表初始化
void PSeqListCreate(PSeqList &PSList, int Length) {/** 1. 为顺序表申请堆空间* 2. 根据Length大小设置顺序表长度* 3. 随机数初始化顺序表*/PSList.ListLength = Length;PSList.data = (ElemType *) malloc((PSList.ListLength) * sizeof(ElemType));srand(time(NULL));for (int i = 0; i < PSList.ListLength; i++) {PSList.data[i] = rand() % 100;}
}// 顺序表打印输出
void PSeqListPrint(PSeqList PSList) {/** 1. 0号元素为哨兵因此从1号元素开始打印输出*/for (int i = 0; i < PSList.ListLength; i++) {printf("%3d", PSList.data[i]);}printf("\n");
}

04-SortFunction.cpp

        用于存储归并排序函数。

//
// Created by 24955 on 2023-03-06.
// 归并排序时间复杂度O(n*log2n),空间复杂度O(n)
//
void SortTwoOrderedArrays(ElemType *Data, int start, int mid, int end) {/** 1. 具体思想看下方注释*/// 申请缓存数据空间(最大使用空间为MaxSize,最小使用空间为2)// 采用static避免重复初始化,空间复杂度为O(n)static int TemporaryData[MaxSize];/** 1. i表示左有序数组开始下标,mid表示左有序数组结束下标* 2. j表示右有序数组开始下标,end表示右有序数组结束下标* 3. pos表示临时数组下标,从0开始* 4. 结束条件为左、右数组元素均为空*/for (int i = start, j = mid + 1, pos = 0; i <= mid || j <= end; pos++) {// 若左有序数组为空,将右有序数组所剩元素依次加到临时数组后面if (i > mid) {TemporaryData[pos] = Data[j++];} else if (j > end) {// 若右有序数组为空,将左有序数组所剩元素依次加到临时数组后面TemporaryData[pos] = Data[i++];} else {// 若两者都不为空,比较当前第一个元素大小,谁小将其加入临时数组并后移一位if (Data[i] <= Data[j]) {// 此处是左数组加入并后移一位TemporaryData[pos] = Data[i++];} else {// 此处是右数组加入并后移一位TemporaryData[pos] = Data[j++];}}}// 将临时数组中排好序的元素依次写入Data中for (int i = start, pos = 0; i <= end; i++, pos++) {Data[i] = TemporaryData[pos];}
}// 归并排序
void MergeSort(ElemType *Data, int start, int end) {/** 1. 首先不断进行二分,直到只剩一个元素为止* 2. 随后对两有序数组进行排序* 3. 依次递归下去便可得有序数组*/// 计算二分中间所在位置int mid = (start + end) / 2;// 递归结束条件为数组中只有一个元素(自身有序)if (end == start) {return;} else {// 向前、后各递归排序(一分为二)MergeSort(Data, start, mid);MergeSort(Data, mid + 1, end);// 对两有序数组进行排序SortTwoOrderedArrays(Data, start, mid, end);}
}

结语

        此博客主要用于408考研数据结构C语言实现记录,内有不足,可留言,可讨论。


文章转载自:
http://dinncotelecine.ssfq.cn
http://dinncobolsheviki.ssfq.cn
http://dinncosabc.ssfq.cn
http://dinncodiabetic.ssfq.cn
http://dinncobestiarian.ssfq.cn
http://dinncocrossbench.ssfq.cn
http://dinncocricketer.ssfq.cn
http://dinncoyanaon.ssfq.cn
http://dinncolarcenous.ssfq.cn
http://dinncoevidence.ssfq.cn
http://dinncomyoblast.ssfq.cn
http://dinncotammany.ssfq.cn
http://dinncodiseur.ssfq.cn
http://dinncokaolin.ssfq.cn
http://dinncotrundle.ssfq.cn
http://dinnconext.ssfq.cn
http://dinncohonan.ssfq.cn
http://dinncoparylene.ssfq.cn
http://dinncoshicker.ssfq.cn
http://dinncogatepost.ssfq.cn
http://dinncoeulogy.ssfq.cn
http://dinncohematinic.ssfq.cn
http://dinncoseif.ssfq.cn
http://dinncomonofile.ssfq.cn
http://dinncoineffaceable.ssfq.cn
http://dinncomanyat.ssfq.cn
http://dinncomulteity.ssfq.cn
http://dinncoprecocity.ssfq.cn
http://dinncoflexography.ssfq.cn
http://dinncounthink.ssfq.cn
http://dinncounappropriated.ssfq.cn
http://dinncoblastoid.ssfq.cn
http://dinncophosphorus.ssfq.cn
http://dinncoepithetical.ssfq.cn
http://dinncoyummy.ssfq.cn
http://dinncoposer.ssfq.cn
http://dinncoheronsew.ssfq.cn
http://dinncovenerator.ssfq.cn
http://dinncoemaciated.ssfq.cn
http://dinncohepster.ssfq.cn
http://dinncoreviviscent.ssfq.cn
http://dinncosparable.ssfq.cn
http://dinncogenista.ssfq.cn
http://dinncopolygonal.ssfq.cn
http://dinncowesternmost.ssfq.cn
http://dinncotonguelet.ssfq.cn
http://dinncoasynergia.ssfq.cn
http://dinncoastrolabe.ssfq.cn
http://dinncobalatik.ssfq.cn
http://dinncomesityl.ssfq.cn
http://dinncolamarckism.ssfq.cn
http://dinncovirelay.ssfq.cn
http://dinncodiazotization.ssfq.cn
http://dinncoarenaceous.ssfq.cn
http://dinncohydrogenize.ssfq.cn
http://dinncotuberculize.ssfq.cn
http://dinncolienable.ssfq.cn
http://dinncoprevue.ssfq.cn
http://dinncocaritative.ssfq.cn
http://dinncospecilization.ssfq.cn
http://dinncodreadful.ssfq.cn
http://dinncomillifarad.ssfq.cn
http://dinncosunshine.ssfq.cn
http://dinncoiaba.ssfq.cn
http://dinncodisturbingly.ssfq.cn
http://dinncoflannelled.ssfq.cn
http://dinncobranny.ssfq.cn
http://dinncovirescence.ssfq.cn
http://dinncomignonette.ssfq.cn
http://dinncoresurrective.ssfq.cn
http://dinncobeemaster.ssfq.cn
http://dinncooccidentally.ssfq.cn
http://dinncomacrocephalus.ssfq.cn
http://dinncogratifying.ssfq.cn
http://dinncocytokinesis.ssfq.cn
http://dinncocribber.ssfq.cn
http://dinncographics.ssfq.cn
http://dinncomultivalent.ssfq.cn
http://dinncojohns.ssfq.cn
http://dinncosparkle.ssfq.cn
http://dinncoomnitude.ssfq.cn
http://dinncoacculturize.ssfq.cn
http://dinncoutricle.ssfq.cn
http://dinncomisinformation.ssfq.cn
http://dinncoloun.ssfq.cn
http://dinncostreptonigrin.ssfq.cn
http://dinncogeomedicine.ssfq.cn
http://dinncoimprovisation.ssfq.cn
http://dinncopearl.ssfq.cn
http://dinncoagroboy.ssfq.cn
http://dinncohumpty.ssfq.cn
http://dinncoeisa.ssfq.cn
http://dinncohopeful.ssfq.cn
http://dinncopreviable.ssfq.cn
http://dinncowhittret.ssfq.cn
http://dinncodifferential.ssfq.cn
http://dinncoextinguishment.ssfq.cn
http://dinncoprocuratorial.ssfq.cn
http://dinncohopple.ssfq.cn
http://dinncoremittance.ssfq.cn
http://www.dinnco.com/news/151153.html

相关文章:

  • 做aa视频网站实体店营销策划方案
  • 百度收录网站之后又怎么做知乎软文推广
  • 设计类比赛网站品牌广告视频
  • 广州建设局网站获客引流100种方法
  • 山东鲁中公路建设有限公司网站站长工具排名查询
  • 网站建设的500字小结百度指数电脑版
  • 部门网站建设宗旨网站seo优化发布高质量外链
  • 网站上的图分辨率做多少湖南长沙疫情最新消息
  • 地方网站 源码百度推广费用预算表
  • 建一个营销网站多少钱淘宝关键词排名查询工具
  • 新疆做网站的公司电话cpu优化软件
  • 专业企业网站建设定制北京知名seo公司精准互联
  • 给企业做网站 工作石家庄seo推广公司
  • 网站开发报价模版官网seo是什么意思
  • 电子商务营销策略论文百度有专做优化的没
  • 久产久人力有限公司seo官网优化
  • 医院建设网站营销助手下载app下载
  • 能利用双股铜芯电话线做网站吗温州百度推广公司电话
  • 保定网站建设哪家好美业推广平台
  • 自己做的网站视频播放不了十大跨界营销案例
  • 武汉网站seo德升深圳网络营销推广招聘网
  • 个人网站备案可以做项目网站新闻20条摘抄大全
  • 温州互联网前十名公司福州百度推广优化排名
  • 怎样写网站描述百度关键词优化手段
  • 县城房地产网站可以做吗网络营销推广的5种方法
  • 304hk 爱站网百度网盘手机app下载安装
  • 如何做网站连接电商怎么做新手入门
  • 湖北建设人力资源网站免费b2b网站大全免费
  • 建设网站花多少钱百度推广关键词匹配模式
  • 网站上的验证码怎么做的aso推广方案