wanide
wanide
全部文章
数据结构
2018蓝桥杯(7)
C语言(77)
dp(3)
hdu(3)
Java(13)
KMP(1)
POJ(3)
字符串(2)
并查集(2)
最小生成树(2)
最短路(5)
未归档(100)
深度优先搜索/广度优先搜索(4)
贪心(1)
归档
标签
去牛客网
登录
/
注册
仙女的博客
面朝大海,然后春暖花开
全部文章
/ 数据结构
(共5篇)
链表实现栈
#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; struct stack { node *top; }q; void push(int n) { no...
2019-06-06
0
556
链表实现队列
#include<stdio.h> #include<stdlib.h> struct node { int data; node *next; }; struct queue { node *head; node *tail; }q; void in() { i...
2019-06-06
0
495
链表
链表是什么: 链表是一种由上一个元素的引用指向下一个元素的存储结构,链表通过指针来连接元素与元素。 链表与数组的区别: (1) 链表是链式的存储结构; (2) 数组是顺序的存储结构; (3)链表通过指针来连接元素与元素,数组则是把所有元素按次序依次存储。 基本实现...
2019-06-03
0
477
栈
栈是后进先出的数据结构。它限定为只能在一端进行插入和删除操作。 题目: 判断一个串是否是回文串。 先找到中间的字符,把他之前的字符入栈,再从他的后面一个字符开始和栈中最先出栈的字符比较。 代码: #include<stdio.h> #include<s...
2019-06-03
0
493
UVA 673 - Parentheses Balance (栈)
You are given a string consisting of parentheses () and []. A string of this type is said to be correct: (a) if it is the empty string (b) i...
2019-01-19
0
527