长沙做网站一般多少钱wordpress如何添加注册登录

news/2025/9/24 4:45:11/文章来源:
长沙做网站一般多少钱,wordpress如何添加注册登录,66郑州网站建设,西安专业网站开发联系电话1.链表 1.1 链表的概念及结构 概念#xff1a;链表是一种物理存储结构上非连续、非顺序的存储结构#xff0c;数据元素的逻辑顺序是通过链表 中的指针链接次序实现的 。 现实中#xff1a;链表就像是一列动车#xff0c;一节连着一节 数据结构中的链表 注意: 1.从上图可看出…1.链表 1.1 链表的概念及结构 概念链表是一种物理存储结构上非连续、非顺序的存储结构数据元素的逻辑顺序是通过链表 中的指针链接次序实现的 。 现实中链表就像是一列动车一节连着一节 数据结构中的链表 注意: 1.从上图可看出链式结构在逻辑上是连续的。但是在物理上不一定连续 2.现实中的结点一般都是从堆上申请出来的 3.从堆上申请的空间是按照一定的策略来分配的两次申请的空间可能连续也可能不连续 2  链表的实现 SList.h(头文件引用) #pragma once #define _CRT_SECURE_NO_WARNINGS 1 #include stdio.h #include malloc.h #include assert.htypedef int SLTDataType;typedef struct SListNode {SLTDataType data;struct SListNode* next; }SLTNode;void SLTPrint(SLTNode* phead);SLTNode* BuySListNode(SLTDataType x); void SLTPushBack(SLTNode ** pphead,SLTDataType x); void SLTPushFront(SLTNode** pphead, SLTDataType x); void SLTPopBack(SLTNode** pphead); void SLTPopFront(SLTNode** pphead);//作业 SLTNode* SLTFind(SLTNode* pphead,SLTDataType x);//在pos之前插入x void SLTInsert(SLTNode** pphead, SLTNode* pos, SLTDataType x); //在之后插入x void SLTInsertAfter( SLTNode* pos, SLTDataType x); //删除pos位置 void SLTErase(SLTNode** pphead, SLTNode* pos); //删除pos后一个位置 void SLTEraseAfter(SLTNode* phead,SLTNode* pos); SList.c(函数功能的实现) #include SList.hvoid SLTPrint(SLTNode* phead) {SLTNode* cur phead;while (cur ! NULL){printf(%d-, cur-data);cur cur-next;}printf(NULL\n); }SLTNode* BuySListNode(SLTDataType x) {SLTNode* newnode (SLTNode*)malloc(sizeof(SLTNode));if (newnode NULL){perror(malloc fail);exit(-1);}newnode-data x;newnode-next NULL;return newnode; }void SLTPushBack(SLTNode** pphead,SLTDataType x) //尾插//需要用二级指针结构体指针地址传递实参 {assert(pphead); //空地址不正确//assert(*pphead);//空链表可以尾插SLTNode* newnode BuySListNode(x);if (*pphead NULL) //如果为空则指向新创建元素{*pphead newnode;}else //不为空则遍历到尾部插入数据{//需要用指针结构体指针改变结构体传递形参SLTNode* tail *pphead;while (tail-next ! 0){tail tail-next;}tail-next newnode;} }void SLTPushFront(SLTNode** pphead, SLTDataType x)//头插 {assert(pphead); //空地址不正确assert(*pphead);//空链表不可以前删SLTNode* newnode BuySListNode(x);newnode-next *pphead;*pphead newnode; }void SLTPopBack(SLTNode** pphead) //尾删 {// 1.空assert(*pphead ! NULL);// 2.一个节点if ((*pphead)-next NULL){free(*pphead);*pphead NULL;}// 3.多个节点else{SLTNode* tail *pphead;while (tail-next-next){tail tail-next;} free(tail-next);tail-next NULL;} }void SLTPopFront(SLTNode** pphead) //头删 {assert(pphead);assert(*pphead);SLTNode* newhead (*pphead)-next;free(*pphead);*pphead newhead; }SLTNode* SLTFind(SLTNode*phead, SLTDataType x) {assert(phead);SLTNode* tail phead;while (tail){if (tail-data x){return tail;}tail tail-next;}return NULL;while (tail-data ! x){tail tail-next;if (tail-nextNULLtail-data!x) //下一个元素的值指向NULL并且数据值不等于要查找的数既已遍历查找完毕并且没有找到数据{printf( 输入错误找不到输入值\n);return 0;}}printf(已找到%d\n, x);return tail; }void SLTInsert(SLTNode** pphead, SLTNode* pos, SLTDataType x) {//有错误版本 地址近似一样(bug)find函数调试就好了assert(pos); assert(*pphead);if (pos *pphead){SLTPushFront(pphead, x); }else{SLTNode* tail *pphead;//在pos之前插入xwhile (tail-next ! pos){tail tail-next;}SLTNode* newnode BuySListNode(x);tail-next newnode;newnode-next pos;}} void SLTInsertAfter(SLTNode* pos, SLTDataType x) {assert(pos);assert(pos-next);SLTNode* newnode BuySListNode(x);//注意顺序不然会照成死循环画图newnode-next pos-next;pos-next newnode;}void SLTErase(SLTNode** pphead, SLTNode* pos) {assert(pos);if (pos *pphead){SLTPopFront(pphead);}else{SLTNode* prev *pphead;while (prev-next ! pos){prev prev-next;}prev-next pos-next;free(pos);}}void SLTEraseAfter(SLTNode* phead,SLTNode* pos) {//assert(pos);//检查是否为尾节点//assert(pos-next);SLTNode* posNext; //纪录要删除的节点//避免丢失无法FreeposNext pos-next;//pos-next pos-next-next;pos-next posNext-next;free(posNext);posNext NULL; }Test_1_16(各种功能的调试、函数、以及面试OJ题的接口实现) #include SList.hvoid TestSList1() {int n;printf(请输入链表长度);scanf(%d, n);printf(\n请依次输入每个节点的值);SLTNode* plist NULL; //第一个元素的地址 for (size_t i 0; i n; i){int val;scanf(%d, val);SLTNode* newnode BuySListNode(val);//头插newnode-next plist;plist newnode;}SLTPrint(plist);SLTPushBack(plist, 5);SLTPrint(plist); }void TestSList() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTPushFront(plist, 10);SLTPushFront(plist, 20);SLTPushFront(plist, 30);SLTPushFront(plist, 40);SLTPrint(plist);}void TestSList3() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTPopBack(plist);SLTPrint(plist);SLTPopBack(plist);SLTPrint(plist);SLTPopBack(plist);SLTPrint(plist);SLTPopBack(plist);SLTPrint(plist);SLTPopBack(plist);SLTPrint(plist);SLTPopBack(plist);SLTPrint(plist);}void TestSList4() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);//SLTPopFront(plist);//SLTPopFront(plist);//SLTPrint(plist);SLTFind(plist, 1);SLTFind(plist, 2);SLTFind(plist, 3);SLTFind(plist, 4);SLTFind(plist, 5);SLTFind(plist, 0); }void TestSlist5() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTNode* pos SLTFind(plist,4);if (pos)pos-data 20;//在pos之前插入x//SLTInsert(plist, pos, 5);SLTPrint(plist);}void TestSlist6() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTNode* pos SLTFind(plist, 4);SLTInsert(plist, pos, 90);SLTPrint(plist); }void TestSlist7() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTNode* pos SLTFind(plist, 4);SLTInsertAfter(pos, 90);SLTPrint(plist); }void TestSlist8() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTNode* pos SLTFind(plist, 4);SLTErase(plist,pos);SLTPrint(plist); }void TestSlist9() {SLTNode* plist NULL;SLTPushBack(plist, 1);SLTPushBack(plist, 2);SLTPushBack(plist, 3);SLTPushBack(plist, 4);SLTPushBack(plist, 5);SLTPrint(plist);SLTNode* pos SLTFind(plist, 4);SLTEraseAfter(plist, pos);SLTPrint(plist); }struct SListNode* removeElement() {; }struct ListNode {int val;struct ListNode* next;};// //struct ListNode* FindKthToTail(struct ListNode* pListHead, int k) //{ // struct ListNode* first pListHead; // struct ListNode* tail pListHead; // // while (first-next) // { // while (k0first-next) // { // k--; // first first-next; // } // if (first-nextNULL) // { // return tail; // } // tail tail-next; // first first-next; // } // //tailtail-next; // return tail-next; //}struct ListNode* FindKthToTail(struct ListNode* pListHead, int k) {if (pListHead NULL){return pListHead;}struct ListNode* first pListHead;struct ListNode* tail pListHead;while (first-next){while (k 0 first-next){k--;first first-next;//if (first-next NULL k 0)//{// return NULL;//}}if (first-next NULLk1){return tail;}else{return NULL;}tail tail-next;first first-next;}//tailtail-next;return tail-next; }int main() {struct SListNode* n1 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n2 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n3 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n4 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n5 (struct ListNode*)malloc(sizeof(struct SListNode));n1-data 1;n2-data 2;n3-data 3;n4-data 4;n5-data 5;n1-next n2;n2-next n3;n3-next n4;n4-next n5;n5-next NULL;FindKthToTail(n1, 6);//TestSList1();//TestSList3();//TestSlist5();//TestSlist7();//TestSlist8();//TestSlist9();/*struct SListNode* n1 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n2 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n3 (struct ListNode*)malloc(sizeof(struct SListNode));struct SListNode* n4 (struct ListNode*)malloc(sizeof(struct SListNode));n1-data 7;n2-data 7;n3-data 7;n4-data 7;n1-next n2;n2-next n3;n3-next n4;n4-next NULL;struct SListNode* head removeElement(n1, 7);return 0;*/}// // // // //int nums1[6] { 1,2,3,0,0,0 }; //int nums1Size 6; //int m 3; //int nums2[3] { 2,5,6 }; //int nums2Size 3; //int n 3;int nums1[1]; int m 0; int nums2[1] {1}; int n 1; // int p1 m - 1, p2 n - 1; // int tail m n - 1; // int cur; // while (p1 -1 || p2 -1) // { // if (p1 -1) // { // cur nums2[p2--]; // } // else if (p2 -1) // { // cur nums1[p1--]; // } // else if (nums1[p1] nums2[p2]) // { // cur nums1[p1--]; // } // else // { // cur nums2[p2--]; // } // nums1[tail--] cur; // }

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/914873.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

xampp做网站可以吗清远做网站的公司

任务已完成,聚类效果很好(主要在于数据的处理以及特征工程), 需代码si,yuer有限先到先得。

网站建设后怎么写网站开发建设好处

|疑惑 最近在学习Python的过程中了解到位运算符,但对于按位取反有点迷糊,就比如说~9(按位取反)之后的结果是-10,为什么不是6呢?所以下面就来看看为什么不是6,正确结果是如何计算出来的呢&#x…

深圳网站建设科技有限公司住房和城乡建设部网站科技项目

目录 1、直接执行JS代码 🌐 1.1 execute_script基础用法 1.2 带参数执行JS函数 1.3 获取执行结果 2、使用execute_async_script异步执行 🔄 2.1 适用场景分析 2.2 实现异步操作示例 2.3 错误处理与调试技巧 3、JS与页面元素交互 👤 3.1 修改DOM属性 3.2 触发事…

怎么做出有品牌感的网站分析不同网站的优缺点

文章目录 前言一、为什么推荐使用java.time包的LocalDateTime而不是java.util的Date?二、使用LocalDateTime和LocalDate时遇到了哪些坑?2.1 Redis序列化报错2.1.1 问题现象2.1.2 问题分析2.1.3 解决方案 2.2 LocalDateTime和LocalDate类型的属性返回给前…

大良营销网站建设咨询阿里云 rds wordpress

使用 Service 把前端连接到后端 如何创建前端(Frontend)微服务和后端(Backend)微服务。后端微服务是一个 hello 欢迎程序。 前端通过 nginx 和一个 Kubernetes 服务暴露后端所提供的服务。 使用部署对象(Deployment ob…

苏州企业建设网站网站建设卖点

useInperativeHandle是通过ref暴露子组件中的方法 1.场景说明-直接调用子组件内部的方法 import { forwardRef, useImperativeHandle, useRef } from "react"// 子组件const Son forwardRef((props, ref) > {// 实现聚焦逻辑const inputRef useRef(null)const …

网站收录 作用wordpress博客视频教程

欢迎您成为我的读者,希望这篇文章能给你一些帮助。前言今天咱们一起来看看在C#中如何使用NPOI第三方控件进行数据的导出。关于NPOI插件网上资料很多,大家感兴趣的可以去看看。本文使用的版本是NPOI 2.5.1。大家可在包管理器NuGet或者下面网址进行下载。h…

阿里巴巴个人网站怎么做个人网站建设的步骤

Linux mren命令介绍 mren(全称multiple rename),它是用来对多个文件进行重命名的工具。这个命令在一次操作中可以批量改变多个文件的名称,特别是在需要对大量文件进行重命名时,mren将节省大量的时间和努力。 Linux m…

无锡建设网站制作垂直型电商网站如何做

💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学习,不断总结,共同进步,活到老学到老导航 檀越剑指大厂系列:全面总结 jav…

如何看网站的建站时间企业网站 手机站

文章目录 基于pytorch的LSTM进行字符集文本生成前言一、数据集二、代码实现 1.到入库和LSTM进行模型构建2.数据预处理函数3.训练函数4.预测函数5.文本生成函数6.主函数完整代码总结 前言 本文介绍了机器学习中深度学习的内容使用pytorch构建LSTM模型进行字符级文本生成任务 一…

怎么创建自己的网站临海建设规划信息网网站

前端实现获取后端返回的文件流并下载 方法一:使用Axios实现文件流下载优点缺点 方法二:使用封装的Request工具实现文件流下载优点缺点 方法三:直接通过URL跳转下载优点缺点 结论 在前端开发中,有时需要从后端获取文件流&#xff0…

重庆市有网站设计维护四川手机网站设计方案

树型结构 树的概念 树是一种非线性结构,他是由n(n>0)个有限结点组成的一个具有层次关系的集合。 当n0时,该树为空树。 在任意一个非空树中都满足以下条件: 1、有一个特殊的结点,称为根结点&#xff0c…

wordpress付费站内搜索零基础网站开发要学多久

一 中断 中断,即cpu暂停执行当前程序,转而执行另外一段特殊程序,处理结束后。返回之前暂停程序继续执行。 中断向量,中断服务程序的入口地址,每个中断源都对应一个固定的入口地址。 中断服务函数,内核响应中…

中国建设银行青海省分行网站怎么建立网站 个人热点

目录 获取token1. base64 用户名 密码2. 先请求要请求的接口3. 请求接口 auth4. 拿着 token, 去请求接口 请求 tag 列表接口1. 去请求token2. 拿着token去请求 镜像 tag 列表 删除镜像1. 先获取镜像 tag 的 sha2562. 删除镜像 错误: {"errors":[{"code":&q…

关于网站集约化建设公函分析网站外链分析工具

物联网网关作为连接设备与云端的桥梁,承担着采集数据、设备远程控制、协议转换、数据传输等重要任务。物联网网关是一种网络设备,它可以连接多个物联网设备,实现设备之间的数据传输和通信。物联网网关通常具有较高的网络带宽和处理能力&#…

打开网站后直接做跳转页面吗吉林网站制作

1. RTC 基本介绍 RTC(Real Time Clock) 即实时时钟,它是一个可以为系统提供精确的时间基准的元器件,RTC一般采用精度较高的晶振作为时钟源,有些RTC为了在主电源掉电时还可以工作,需要外加电池供电 2. RTC 控制器 2.1 RTC的特点是:…

做网站找哪家又便宜又好个人站长做什么网站好

对Web应用程序来说,发生不可预知的错误和异常在所难免,我们必须为Web程序提供错误处理机制。当错误发生时,我们必须做好两件事情:一是将错误信息记录日志,发邮件通知网站维护人员,方便技术人员对错误进行跟…

做网站设计哪家好专做美妆的网站

从ORALE 10GR2开始出现透明数据加密技术(Transparent Data Encryption,TDE)TDE用来对数据加密,通常 SQL 执行的应用程序逻辑不需要进行更改,仍能正常运行。 换言之,应用程序可以使用同一语法将数据插入到应用程序表中,…

学做网站记不住代码我要自学网免费视频教程

使用TagList http://blog.csdn.net/fbfsber008/article/details/7044723 转载于:https://www.cnblogs.com/tiantao/p/2389126.html

定制网站制作公司有哪些无锡软件网站开发公司

删除mysql表(用的是innodb)时没有用drop table命令,只是简单删除表目录,这导致表空间还存在,这样就不可以加同名表进去。当要重新导入新的同名表或者创建新的同名表时,会提示错误Error : Tablespace for ta…