{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003e翻转一个链表\u003c/p\u003e \n \u003cp\u003e特殊要求:\u003cstrong\u003e请使用以下链表结构\u003c/strong\u003e\u003c/p\u003e \n \u003cpre\u003eclass Node\r\n {\r\n int value;\r\n Node next;\r\n }\u003c/pre\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cp\u003e输入包含多组数据。对于每组数据: \u003c/p\u003e \n \u003cp\u003e第一行是n,表示链表长度;当n\u003d-1时,表示输入结束。(1 \u0026lt;\u003d n \u0026lt;\u003d 100) \u003c/p\u003e \n \u003cp\u003e第二行是n个整数,表示链表每一位所存储的内容。\u003c/p\u003e \n "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cp\u003e针对每组输入,输出翻转后的链表的内容。\u003c/p\u003e \n \u003c/div\u003e \n "}},{"title":"Sample Input","value":{"format":"HTML","content":" \n \u003cpre\u003e4\r\n1 3 5 7\r\n-1\u003c/pre\u003e \n "}},{"title":"Sample Output","value":{"format":"HTML","content":" \n \u003cpre\u003e7 5 3 1\u003c/pre\u003e \n "}}]}