题目地址:https://pintia.cn/problem-sets/15/problems/725 顺序表基本操作 注意初始化空表的时候 List L = (List)malloc(sizeo ...
本题要求实现一个将输入的学生成绩组织成单向链表的简单函数。 函数接口定义: void input 该函数利用scanf从输入中获取学生的信息,并将其组织成单向链表。链表节点结构定义如下: struct stud node int num 学号 char name 姓名 int score 成绩 struct stud node next 指向下个结点的指针 单向链表的头尾指针保存在全局变量head ...
2018-09-14 19:42 1 7307 推荐指数:
题目地址:https://pintia.cn/problem-sets/15/problems/725 顺序表基本操作 注意初始化空表的时候 List L = (List)malloc(sizeo ...
给定两个均不超过9的正整数a和n,要求编写函数求a+aa+aaa++⋯+aa⋯a(n个a)之和。 函数接口定义: int fn( int a, int n ); int Su ...
给定两个均不超过9的正整数a和n,要求编写函数求a+aa+aaa++⋯+aa⋯a(n个a)之和。 函数接口定义: 其中函数fn须返回的是n个a组成的数字;SumA返回要求的和。 裁判测试程序 ...
本题要求实现一个合并两个有序链表的简单函数。链表结点定义如下: struct ListNode { int data; struct ListNode *next; }; 函数接口定义: struct ...
题目地址:https://pintia.cn/problem-sets/15/problems/724 反转链表,将原链表的结点直接反转过来,不是新建一个链表,注意空链表的情况,需要特判 View Code ...
题目地址 本题要求实现一个函数,将给定的单链表逆转。 函数接口定义: List Reverse( List L ); 其中List结构定义如下: typedef struct Node *PtrToNode; struct Node { ElementType Data ...
How would you implement mergesort without using recursion? The idea of iterative mergesort is to st ...