求迷宫问题下面代码的解释,复杂度和程序运行环境

希望大家能帮忙给出每个步骤的解释以及复杂度的分析和程序运行环境!求求

#include <stdio.h>
#include <stdlib.h>

typedef struct//迷宫部设置
{
int shu[16][16];
int row;
int col;
}Maze;

struct node
{
int row;
int col;
struct node *next;
};

struct node *p;

void push(int x1,int y1)
{
struct node *a;
a=(struct node *)malloc(sizeof(struct node));
a->row=x1;
a->col=y1;
a->next=p;
p=a;
}

void pop(void)
{
struct node *q;
q=p;
p=p->next;
free(q);
}

void CreatInit(Maze *m,int x,int y)//创建迷宫
{

printf("please input number:\n");
int i,j;
for(i=0;i<=x;i++)
{
    for(j=0;j<=y;j++)
        m->shu[i][j] = 2;
}
for(i=1;i<=x;i++)
    for(j=1;j<=y;j++)
        scanf("%d",&m->shu[i][j]);
m->row = x;
m->col = y;

}

void menu()
{
printf("\n*************************\n");
printf(" 欢迎进入迷宫\n");
printf(" 1、进入迷宫\n");
printf(" 2、退出\n");
}

int main(void)
{
int t;
int x,y;
int x1,y1;
int x2,y2;
int i,j;
while(1)
{
menu();
printf("请选择:");
scanf("%d",&t);
if(t == 2)
break;
printf("输入迷宫的形状!\n");
scanf("%d%d",&x,&y);
Maze m;
CreatInit(&m,x,y);
for(i=1;i<=x;i++)
{
for(j=1;j<=y;j++)
printf("%d\t",m.shu[i][j]);
printf("\n");
}
printf("输入入口位置:");
scanf("%d%d",&x1,&y1);
printf("输入出口的位置:");
scanf("%d%d",&x2,&y2);
p=(struct node *)malloc(sizeof(struct node));
p->row=0;
p->col=0;
p->next=NULL;
push(x1,y1);
while((x1 >= 1 && x1 <= x) || (y1 >= 1 && y1 <= y))
{
if(x1 == x2 && y1 == y2)
{
break;
}
if(m.shu[x1][y1+1] == 0 )
{
y1=y1+1;
push(x1,y1);
m.shu[x1][y1] = -1;
continue;
}
if(m.shu[x1-1][y1]==0 )
{
x1=x1-1;
push(x1,y1);
m.shu[x1][y1] = -1;
continue;
}
if(m.shu[x1][y1-1]==0 )
{
y1=y1-1;
push(x1,y1);
m.shu[x1][y1]= -1;
continue;
}
if(m.shu[x1+1][y1]==0 )
{
x1=x1+1;
push(x1,y1);
m.shu[x1][y1]= -1;
continue;
}
pop();
if(p->next==NULL)
break;
x1=p->row;
y1=p->col;
}

        if(x1 == x2 && y1 == y2)
        {

            while(p->next != NULL)
            {
            
                printf("%d %d\n",p->row,p->col);
                pop();
        
            }
        }
        else 
            printf("No Answer !!!");
}
return 0;

}