Acaibird
Acaibird
全部文章
个人笔记
题解(14)
归档
标签
去牛客网
登录
/
注册
Acaibird的博客
全部文章
/ 个人笔记
(共16篇)
前缀表达式:c语言简单实现
#include <stdio.h> int main(int args, char** argv) { /*ios::sync_with_stdio(false); cin.tie(nullptr); cin.tie(nullptr);*/ char c; int flag ...
2022-10-27
0
365
顺序表加损失一个储存位 -》实现队列
int cnt{ }; typedef struct ty* pos; struct ty { int* a; int maxsize; int f, nex; }; void cre(pos& l, int s) { l = new ty; l->a = new int[...
2022-10-26
0
279
6-1 另类循环队列
对带有元素数量个数变量count的队列 typedef int Position; typedef struct QNode *PtrToQNode; struct QNode { ElementType *Data; /* 存储元素的数组 */ Position Front;...
2022-10-25
0
341
顺序表删除、增加、初始化元素
#include <stdio.h> #include <stdlib.h> #define MAXSIZE 5 typedef int ElemType; typedef struct{ ElemType *elem; int length; }SqLis...
2022-10-24
0
366
有尾插法,头插法建立有头结点的链表
有头节点的链表,头插法 typedef struct Node { int data; // 存储链表数据 struct Node* next; // 存储结点的地址 }node, * llist; void creat(llist&...
2022-10-24
0
385
共享顺序栈的实现
typedef struct StackRecord *Stack; struct StackRecord { int Capacity; /* maximum size of the stack array */ int Top1; /* top ...
2022-10-17
0
353
按照顺序进栈,判断是否可以以给定序列出栈出栈
void solved() { int n; cin >> n; //储存出栈次序 ifor(i, 0, n - 1) { cin >> a[i]; } int temp = 1; //判断栈顶元素是否和即将要出栈的元素是否相等不相等继续向栈...
C++
2022-10-09
0
288
高精度算法
#include<stdio.h> #include<string> #include<string.h> #include<iostream> using namespace std; //compare比较函数:相等返回0,大于返回1,小于返回-1...
2022-10-06
0
192
lower_bound(大于等于x的第一个数),upper_bound(大于等于x的最后一个数字)
//core code int a[10] = { 1,3,5,9,13,16,22,45,48,49 }; //寻找>=x的第一个位置 Find the first position >= x ,from left to right; int pos(int x,int l,int ...
2022-10-06
0
367
stringstream流输出给string类时,自动忽略字符前面的空格
//#include <bits/stdc++.h> #include <functional> #include <iostream> #include <cstdio> #include <algorithm> #include <...
2022-09-26
0
319
首页
上一页
1
2
下一页
末页