栈和队列部分伪代码 1、设单链表的表头指针为 L L L,结点结构由 d a t a data data和 n e x t next next两个域构成,其中 d a t a data data域为字符型。试设计算法判断该链表的全部 n n n个字符是否中心对称。例如 X Y X 、 X Y Y X XYX、XYYX XYX、XYYX都是中心对称 文字思想: 1)设计一个求单链表表长函数CalLength 2)创建一个链栈B,初始时B->next = NULL,若L的表长len为奇数,则L依次遍历len/2个结点并将其依次入栈B,L = L->next,L和B依次比较ÿ