Skip to content

Bug Report for reverse-a-linked-list #5249

@gitalic

Description

@gitalic

Bug Report for https://neetcode.io/problems/reverse-a-linked-list

There are many gibberish input/output pairs in the beginning problem statements.

Example 1

See
https://neetcode.io/problems/reverse-a-linked-list/question?list=neetcode150
Image

This instruction
Image

…is nonsensical. The value head should not be a list, it should a node in a linked list. If you must use an 'intput / output' description for this --- which is weird because it's not a functional program test --- I would suggest something like

Input: 0 -> 1 -> 2 -> 3

Result: 3 -> 2 -> 1 -> 0

Example 2

See
https://neetcode.io/problems/remove-duplicates-from-sorted-array/question?list=neetcode150
Image

This instruction
Image

…is nonsensical. Whatever you mean by 'output' it should involve k, the return value. The value k is not a list, it's an int. I would suggest something like:

Output: nums = [1,2,3,4,*], k = 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions