会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Tomorrow
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
69
70
71
72
73
2019年9月15日
单链表反转
摘要: List Reverse(List head) { if (head == NULL || head->Next == NULL) { return head; } List p; List q; List r; p = head; q = head->Next; head->Next = NULL; whi...
阅读全文
posted @ 2019-09-15 13:16 Tomorrow1126
阅读(94)
评论(0)
推荐(0)
2019年9月8日
PTA 自测-4 Have Fun with Numbers
摘要: 1、用字符串记录数字 2、vector
阅读全文
posted @ 2019-09-08 10:43 Tomorrow1126
阅读(228)
评论(0)
推荐(0)
2019年9月6日
9.4一些问题
摘要: 1、共用体 union 可以存储不同的数据类型,但只能同时存储其中的一种类型。 共用体每次只能存储一个值。 共用体的长度是其最大的成员的长度。 2、枚举 enum创建符号常量, enum spectrum {red ,yellow,blue=8,white};//0,1,8,9 枚举量默认从0开始,
阅读全文
posted @ 2019-09-06 15:27 Tomorrow1126
阅读(106)
评论(0)
推荐(0)
堆栈
摘要: 堆栈 #include<iostream> #define maxsize 1000 using namespace std; typedef struct SNode*Stack;//栈的顺序存储结构 struct SNode { int data[maxsize]; int top;//栈顶元素 }; void Push(Stack Ptrs, int item)//入栈 { if (Ptrs
阅读全文
posted @ 2019-09-06 10:23 Tomorrow1126
阅读(127)
评论(0)
推荐(0)
线性表--顺序表
摘要: 线性表的数组实现 #include const int max = 1000; using namespace std; typedef struct LNode *List; struct LNode { int Data[max]; int Last; }; List MakeEmpty() { List PtrL; PtrL = (List)malloc(...
阅读全文
posted @ 2019-09-06 10:22 Tomorrow1126
阅读(154)
评论(0)
推荐(0)
最大子列和问题
摘要: 一种很简单的算法int MaxSub(int A[], int N) { int ThisSum, MaxSum; int i; ThisSum = 0; MaxSum = 0; for (int i = 0; i MaxSum) { MaxSum = ThisSum; } else...
阅读全文
posted @ 2019-09-06 10:21 Tomorrow1126
阅读(103)
评论(0)
推荐(0)
2019年8月12日
1打印沙漏
摘要: 恢复内容开始 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号,不一定能正好组成一个沙漏。要求
阅读全文
posted @ 2019-08-12 14:34 Tomorrow1126
阅读(146)
评论(0)
推荐(0)
上一页
1
···
69
70
71
72
73
公告