#include #include using namespace std; typedef struct node { int num; node* next; }node; int n; int ray[1005]; void array(){ int i; cout<=0;i--){ cout<num=ray[i]; q->next=p; q=p; } q->next=NULL; /*头插法*/ p=head->next; head->next=NULL; while(p) { q=p; p=p->next; q->next=head->next; head->next=q; } q=head->next; while(1){ if(q->next==NULL) { cout<num<num<next; } } } int main() { int i; cin>>n; for(i=0;i>ray[i]; } array(); list(); return 0; }
c语言线性表就地逆置,2.线性表的就地逆置
最新推荐文章于 2022-10-20 17:07:59 发布