Skip to content

ENH: Implement a function to find the longest decreasing streak #18

@seberg

Description

@seberg

We would like to have a small function that finds the longest streak of decreasing values.
For example given the list:

  • [3, 1, 2, 3, 2, 4] would find [1, 2, 3] at index 1.
  • [1, 2, 0, 10, 100] would find [0, 100, 100].

Working on this issue

Implementing bubblesort consists of the following things:

  • Find the existing longest_decreasing_streak stub and replace it with your implementation.
  • Add documentation (you can look at largest_lement or merge_sort for inspiration).
  • Add some tests by expanding the test_longest_decreasing_streak in test_inspect.py.
  • Once you have made your changes, and committed them to a new branch, you can create a PR!

(This is similar to gh-17, but we can work on two different implementations in parallel.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions