Guidelines

Coding Quiz

In this coding quiz, you will write a solution function to implement a Linked List.

You will input several integers, and these integers should be stored in a linked list.

The solution function should construct a linked list with the given integers and output the elements of the list in order.

Code Template
class ListNode: def __init__(self, value=0, next=None): self.value = value self.next = next def solution(numbers): # Write your code here return

Constraints

  • The input integers are between 1 and 100, inclusive.

  • The length of the linked list is between 1 and 10, inclusive.

  • Implement the linked list as a basic Singly Linked List.


Input/Output Example

  • Input: [1, 3, 5, 7]

  • Output: [1, 3, 5, 7]

Mission
0 / 1

A linked list can be accessed like an array using an index.

O
X

Guidelines

AI Tutor

Publish

Design

Upload

Notes

Favorites

Help