相反的順序存儲

題目描述 給出一個鏈表,並將鏈表的值以倒序存儲到數組中。java 算法思路 使用遞歸,時間複雜度O(n)算法 代碼實現(JAVA) public class Solution { /** * @param head: the given linked list * @return: the array that store the values in reverse o
相關文章
相關標籤/搜索