Skip to content

Bug Report for kth-largest-integer-in-a-stream #4938

@christerng

Description

@christerng

Bug Report for https://neetcode.io/problems/kth-largest-integer-in-a-stream

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

Test Case 2 expected output is incorrect. The last element returned should be 4, not 8.

8, 5, 4, 2

8, 5, 4, 3, 2 -> 8, 5, 3, 2 [4]

8, 5, 5, 3, 2 -> 8, 5, 3, 2 [5]

10, 8, 5, 3, 2 -> 10, 8, 3, 2 [5]

10, 9, 8, 3, 2 -> 10, 9, 3, 2 [8]

10, 9, 4, 3, 2 -> 10, 9, 3, 2 [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