递归

144 阅读1分钟

模版:

public ListNode reverseList(参数0) { if (终止条件) return;

逻辑处理(可能有,也可能没有,具体问题具体分析)

//递归调用
ListNode reverse = reverseList(参数1);

逻辑处理(可能有,也可能没有,具体问题具体分析)

}