Skip to content

Bug Report for python-resizable-list-part-1 #4457

@LukeMattingly

Description

@LukeMattingly

Bug Report for https://neetcode.io/problems/python-resizable-list-part-1

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

Challenge: pop_n(arr: List[int], n: int) -> List[int]. It should remove the last n elements from the list and return the resulting list. If n is greater than the length of the list, it should return an empty list.

Third test case print(pop_n([1, 2, 3, 4, 5], 5)) has n = length, but result shows an empty list, []. Should update description to be greater than or equal, as there's already a test case for the greater than scenario.

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy