leetcode.jp 博客
本网站所有文字及图片内容均来自网络,每周定时更新,仅供个人学习与研究,请勿用于商业用途。谢谢合作。

206. Reverse Linked List

Reverse a singly linked list.

Example:

Input: 1->2->3->4->5->NULL
Output: 5->4->3->2->1->NULL

Follow up:

A linked list can be reversed either iteratively or recursively. Could you implement both?

Difficulty:

Easy

Lock:

Normal

Company:

Adobe Alibaba Amazon Apple Baidu Bloomberg ByteDance Cisco eBay Facebook FactSet Goldman Sachs Google Intel Mathworks Microsoft Nvidia Oracle Paypal Qualcomm Snapchat TripAdvisor Twitter Two Sigma Uber Visa VMware Walmart Labs Yahoo Yandex Yelp Zenefits