No older revisions available
No older revisions available
C version ¶
- 개발자 : 나휘동
~cpp typedef poly * poly_ptr struct poly{ int coef; int expon; poly_ptr link; }; ... poly_ptr invert(poly_ptr p) { poly_ptr front, middle; /*front = p; middle = front->link; p = middle->link; front->link = NULL; middle->link = front;*/ middle = NULL; while(p){ front = middle; middle = p; p = p->link; middle->link = front; } return middle; }