劍指offer刷題--GZ15--反轉鏈表

題目描述 輸入一個鏈表,反轉鏈表後,輸出新鏈表的表頭。 示例1 輸入java {1,2,3} 返回值web {3,2,1} public class Solution { public ListNode ReverseList(ListNode head) { if(head==null) return null
相關文章
相關標籤/搜索