This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://leetcode.com/problems/reverse-linked-list/ | |
* | |
* O(n) runtime, O(1) space | |
* | |
* this question can be solved by using an iteration method or a recursion method | |
*/ | |
/** | |
* Definition for singly-linked list. |