数据结构
文章平均质量分 53
旧酒笙
这个作者很懒,什么都没留下…
展开
-
链表的创建插入以及删除
链表是一种很常见的数据结构,相对使用数组存放数据,使用链表更加节省空间,并且在任意位置删除,添加元素都是很快的#include<cstdio>#include<cstdlib>#include<iostream> using namespace std;//创建一个结构体,表示链表的节点类型 struct Student{ char ...原创 2018-07-16 21:30:57 · 1012 阅读 · 0 评论 -
在一组从小到大排序的数据中插入一个数,使其仍然这样排列
#include<iostream>#include<cstdlib>using namespace std;//创建一个结构体,表示链表的节点类型 struct node{ int data; struct node *next;};int main(){ struct node *head,*p,*q,*t; int n,a...原创 2018-07-16 21:35:33 · 6679 阅读 · 0 评论 -
有两个字符串str和substr,str和substr的字符个数不超过10^5,只包含大小写字母和数字。(字符个数不包括字符串结尾处的’\0’。)将substr插入到str中ASCII码最大的那个字符
输入格式只有一行:str substr java 代码: package jiegouSuanfa;import java.util.Scanner;public class InsertString { public static void main(String[] args) { Scanner sc=new Scanner(System....原创 2018-10-22 12:19:50 · 4246 阅读 · 0 评论 -
链表的插入删除,交集
#include <stdio.h>#include <stdlib.h>#include <malloc.h>typedef struct node { int Nnember; struct node *pNext;} Node,*pNode;pNode pHead = NULL;int data;int num;int choo...原创 2018-12-17 20:05:42 · 156 阅读 · 0 评论