链表
豆浆味道的奶茶°
这个作者很懒,什么都没留下…
展开
-
数据结构之链表(c语言实现),将一个升序链表中插入一个元素,使原链表仍然升序
数据结构之链表(c语言实现)题目:将一个升序链表中插入一个元素,使原链表仍然升序#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next;}ElemSN;//定义结构体单元ElemSN * createlink(int data[],int n)...原创 2019-10-04 16:09:07 · 3337 阅读 · 0 评论 -
数据结构之链表(c语言实现),数据域重复,删除关键字为key的结点。
数据结构之链表(c语言实现)题目:数据域重复,删除关键字为key的结点。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next; }ElemSN;//建立链表单元ElemSN * Delkey(ElemSN * h,int key){ ...原创 2019-10-10 21:24:43 · 316 阅读 · 0 评论 -
数据结构之链表(c语言实现),删除链表中数据的最大值。
数据结构之链表(c语言实现)题目:删除链表中数据的最大值。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next;}ElemSN;ElemSN * createlink(int data[],int n) { ElemSN *h=NULL...原创 2019-10-10 21:29:51 · 942 阅读 · 0 评论 -
数据结构之链表(c语言实现),删除奇数序号结点。
数据结构之链表(c语言实现)题目:删除奇数序号结点。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next;}ElemSN;ElemSN * createlink(int data[],int n) { ElemSN *h=NULL,*t...原创 2019-10-10 21:36:37 · 1547 阅读 · 0 评论 -
数据结构之链表(c语言实现),将链表中的重复值的数据使其只出现一次,形成一个新的链表。
数据结构之链表(c语言实现)题目:将链表中的重复值的数据使其只出现一次,形成一个新的链表。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next;}ElemSN; ElemSN * Delsomekey(int data[],int n)//此函...原创 2019-10-10 21:41:55 · 425 阅读 · 0 评论 -
数据结构之链表(c语言实现),判断两个非空单向链表是否有公共结点,是,返回结点,否则返回NULL。
数据结构之链表(c语言实现)题目:判断两个非空单向链表是否有公共结点,是,返回结点,否则返回NULL。分析:这种情况只能是尾部有公共结点,结点是公共的,说明尾结点地址是相同的,则可以找出尾结点的地址,这就需要二级指针建栈来存储地址,来比较栈顶数据是否相同,若相同,则有公共尾结点,否则,则无公共结点。#include<stdio.h>#include<stdlib.h>...原创 2019-10-10 22:13:01 · 188 阅读 · 0 评论 -
数据结构之链表(c语言实现),升序链表。
数据结构之链表(c语言实现)题目:升序链表。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next;}ElemSN;ElemSN * createlink(int data[],int n) { ElemSN *h=NULL,*t,*ne...原创 2019-10-10 22:17:09 · 1222 阅读 · 0 评论 -
数据结构之链表(c语言实现),将两个升序链表合并。
数据结构之链表(c语言实现)题目:将两个升序链表合并。 #include<stdio.h> #include<stdlib.h> typedef struct node { int data; struct node* next; }ElemSN;ElemSN *PreCreatLink(int a[],int n){ ElemSN *hea...原创 2019-10-10 22:21:56 · 2280 阅读 · 0 评论 -
数据结构之链表(c语言实现),逆置链表
数据结构之链表(c语言实现)题目:逆置链表。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node * next;}ElemSN;ElemSN * createlink(int data[],int n) { ElemSN *h=NULL,*t,*ne...原创 2019-10-11 12:29:37 · 533 阅读 · 0 评论