Skip to content

Files

Latest commit

author
Mauricio Klein
Nov 1, 2019
fdd6ba9 · Nov 1, 2019

History

History

challenge-20

Reverse a Linked List

This problem was asked by Google.

Description

Given a singly-linked list, reverse the list.

This can be done iteratively or recursively.

Can you get both solutions?

Example

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