Skip to content
C

Create and Traverse a Linked List

Easyjavapythonccppjavascript

Given a list of values, build a singly linked list in that order and print its values from head to tail.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

Print the N values in head-to-tail order, separated by single spaces.

Input (stdin)

Output

Run your code to see output here...