数据结构
欧菲博客
这个作者很懒,什么都没留下…
展开
-
队列操作
#include#includestruct Node{ int data; struct Node *pointer;};struct Queue{ struct Node *head; struct Node *tail;};struct Queue *Queue_Construct(void);char Queue_Empty(struct Queue queue);原创 2013-09-08 20:27:59 · 547 阅读 · 0 评论 -
uva6465栈应用
#include#includeusing namespace std;int p,k;stacks;int ans;int main(){// freopen("in.txt","r",stdin); cin>>p; for(int t=1;t<=p;t++){ ans=0; cin>>k; while(!s.empty())s.pop(); s.push(0)原创 2014-07-15 18:36:24 · 342 阅读 · 0 评论 -
ZOJ3612
#include#include#include#include#include#includeusing namespace std;typedef long long LL;multisetA,B;multiset::iterator it1,it2;LL T,n;char s[10];LL t;void maintain(){ while(A.size()>B.s原创 2014-07-16 20:11:40 · 358 阅读 · 0 评论 -
栈操作
#include#includestruct Node{ int data; struct Node *pointer;};struct Stack{ struct Node *top; struct Node *bottom;};struct Stack *Stack_Construct(void);char Stack_Push(struct Stack *pstack,原创 2013-09-08 18:08:10 · 515 阅读 · 0 评论 -
链表操作
/*************************************************************/#include#include/*************************************************************/struct Node{ int data; struct Node *next;};struct原创 2013-09-08 16:25:17 · 657 阅读 · 0 评论 -
程序调用过程
调用子函数的过程主函数工作参数入栈 顺序与虚参数在参数列表相反。int fun(int a, int b),b先,a后。返回值入栈 此时,返回值还没有,位置先占住。设置,保存返回地址 入栈返回地址,函数从子函数返回时,继续从这里执行。 跳转 eip=子函数入。子函数工作建栈 入栈当前ebp。 给ebp赋值,新的ebp要指向被调函数的栈底。所以,将当原创 2017-10-06 03:16:35 · 854 阅读 · 0 评论