Skip to content

Bug Report for top-k-elements-in-list #4940

@zynioo

Description

@zynioo

Bug Report for https://neetcode.io/problems/top-k-elements-in-list

Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.

My solution should be ok but i get that problem. It's giving an array [1,2] so the output should be [1,2] but its wrong

Last executed test case

Input:

nums=[1,2]
k=2
Your Output:

[1,1]
Expected output:

[1,2]

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