- 博客(8)
- 收藏
- 关注
原创 MOOC浙大数据结构 第一讲基本概念
提示:这里对文章进行总结:例如:以上就是今天要讲的内容,本文仅仅简单介绍了pandas的使用,而pandas提供了大量能使我们快速便捷地处理数据的函数和方法。
2023-07-19 16:17:43 79
原创 MOOC数据结构 浙江大学 2.3.1队列及顺序存储实现
#include<stdio.h> #include<stdlib.h> #define maxsize 5 struct nodeq{ int data[maxsize]; int rear; int front; int flag;//标志是满还是空 最大限度利用data数组的空间 }; typedef struct nodeq *queque; int isfull(queque ptrq) { if(((ptrq->rear)%maxsize==...
2021-01-21 18:21:46 90
原创 MOOC数据结构 浙江大学 2.2.3栈堆的链式存储实现
笔记 #include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; typedef struct node stack; typedef stack *ptr; ptr createstack() { ptr s; s = (ptr)malloc(sizeof(stack)); if(s==NULL) { printf("栈头申请空间失败"); return
2021-01-05 20:08:12 179
原创 MOOC数据结构 浙江大学 第一周 课后练习3:算法 二分查找算法(有错,待改)
题目:本题要求实现二分查找算法。 函数接口定义: Position BinarySearch( List L, ElementType X ); 其中List结构定义如下: ```c typedef int Position; typedef struct LNode *List; struct LNode { ElementType Data[MAXSIZE]; Position Last; /* 保存线性表中最后一个元素的位置 */ }; L是用户传入的一个线性表,其中Elemen
2021-01-02 23:31:58 417
原创 MOOC数据结构 浙江大学 第一周 课后练习2:算法 Maximum Subsequence Sum
算法 Maximum Subsequence Sum 2004年浙江大学计算机专业考研复试真题 题目:Given a sequence of K integers { N1, N2, …, NK }. A continuous subsequence is defined to be { Ni, Ni+1, …, Nj } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which
2021-01-02 23:26:07 133
原创 MOOC数据结构 浙江大学 第一周 课后练习1:算法 最大子列和问题
第一周 课后练习:算法 最大子列和问题 题目:给定K个整数组成的序列{ N1, N2, …, NK },“连续子列”被定义为{ Ni, Ni+1, …, Nj },其中 1≤i≤j≤K。“最大子列和”则被定义为所有连续子列元素的和中最大者。例如给定序列{ -2, 11, -4, 13, -5, -2 },其连续子列{ 11, -4, 13 }有最大的和20。现要求你编写程序,计算给定整数序列的最大子列和。 本题旨在测试各种不同的算法在各种数据情况下的表现。各组测试数据特点
2021-01-02 23:14:46 155
原创 MOOC数据结构 浙江大学 2.2.2栈堆地顺序存储实现
2.2.2 栈堆地顺序存储实现 笔记: 定义数据结构{ int a[],int top} push{}入栈 pop{}出栈 #include<stdio.h> #include<math.h> #include<stdlib.h> #define maxmath 20 struct snode { int top; int data[maxmath]; };//定义结构 typedef struct snode *stack;//重命名 void push(s
2021-01-02 22:55:01 215
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人