Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 951 Bytes

File metadata and controls

40 lines (23 loc) · 951 Bytes

206. Reverse Linked List

English | 简体中文 | 繁體中文 | 日本語 | Español | Deutsch | Français

⬅️ 返回题目列表


🟢 难度: Easy

题目

給定一個單鏈表的頭節點 head,反轉該鏈表,並返回反轉後的鏈表。

💡 APL 解法

ReverseList  {}

📝 解释

Reverse Linked List 的 APL 解决方案。使用反转 (⌽) 翻转数组元素。实现使用 APL 的面向数组原语进行简洁表达。

⏱️ 复杂度分析

  • 时间复杂度: O(n)
  • 空间复杂度: O(1)

📚 资源


Made with ❤️ using APLView All Problems