Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you implement both? 反向链表,分别用递归和迭代方式实现. 递归Iteration: 新建一个node(value=任意值, next = None), 用一个变量 next 记录head.next,head.next指向新node.next,新 node.next…