Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution for local maxima with plateau #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jozsarato
Copy link

No description provided.

# print(find_maxima(x))

#if __name__ == '__main__':
#main()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove dead code 💀

@pberkes
Copy link
Contributor

pberkes commented Sep 6, 2022

Tests are missing

@pberkes
Copy link
Contributor

pberkes commented Sep 7, 2022

I think the solution would fail this test:

def test_local_maxima_not_a_plateau():
    values = [1, 2, 2, 3, 1]
    expected = [3]
    maxima = local_maxima(values)
    assert maxima == expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants