
数据结构
Erkang september
笔记记录,所创内容无参考价值
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2020-10-23
一:插入排序 将第一个元素看作有序序列,将后续元素依次插入,比较条件中不包含等于,所以是一种稳定的算法。无哨兵:#include <stdio.h>void insertSort(int a[],int n);void print(int a[],int n);void print(int a[],int n){ for(int i=0;i<n;i++){ printf(" %d",a[i]); } printf("\n");}...转载 2020-10-23 22:41:49 · 168 阅读 · 0 评论 -
顺序表的c语言实现
#include<stdio.h>#include<malloc.h>#define MAXSIZE 100typedef struct { char name[20]; double score; char sno[20];}student;typedef struct { student *elem; int length;}Seqlist;...原创 2019-05-23 19:16:00 · 3561 阅读 · 0 评论 -
选择排序递归
package com.imooc.ten;import java.util.Arrays;public class XuanZeRecursion { public static int[] selectionSort(int[] array,int minIndex) { int mid=minIndex; if (minIndex==array.length)...原创 2019-05-30 20:34:25 · 350 阅读 · 0 评论 -
冒泡排序递归
package com.imooc.ten;import java.util.Arrays;public class MaoPaoRecursion { public static int[] bubbleSort(int[] array,int size) { //boolean flag=true; if (size== 0) ret...原创 2019-05-23 22:46:11 · 1138 阅读 · 0 评论 -
用c写链表
#include<stdio.h>#include<malloc.h>typedef struct { char name[20]; double score; char sno[20];}student;typedef struct LNode{ student data; //数据域 struct LNode *ne...原创 2019-05-28 21:17:46 · 184 阅读 · 0 评论