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

Nth Largest Element of list/array #17

Open
jimouris opened this issue Aug 14, 2024 · 3 comments
Open

Nth Largest Element of list/array #17

jimouris opened this issue Aug 14, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@jimouris
Copy link
Member

jimouris commented Aug 14, 2024

Request a New Nada Example

Find Nth largest element in list.

Description

Write a Nada program to find the nth largest (or smallest) element in size from a list or array.

optional: extended into multiple dimensions with custom comparators.

Use Case

Describe the use case for this example. Why is it important? How will it benefit other users?

Specific Requirements

  • Inputs: A list/array of SecretIntegers and the n.
  • Outputs: The nth largest (or smallest) value of the list.
@jimouris jimouris added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 14, 2024
@oceans404 oceans404 added good first issue Good for newcomers help wanted Extra attention is needed and removed documentation Improvements or additions to documentation labels Aug 14, 2024
@Sohammhatre10
Copy link
Contributor

Hello @oceans404 I'll take this one.

@Sohammhatre10
Copy link
Contributor

Have completed this here #40 will you guys please check the same @oceans404 @jimouris
Thanks!

@jimouris
Copy link
Member Author

Hey @Sohammhatre10! Thanks for your PR!

It seems that the way I wrote this issue was a bit confusing. This was to return the nth largest, not the element on the nth position. Check the inputs and outputs:

Inputs: A list/array of SecretIntegers and the n.
Outputs: The nth largest value of the list.

What you implemented is really good though so we can definitely merge it but we'll keep this issue open :) I have some small comments about your implementation; I'll follow up directly in the PR.

@jimouris jimouris changed the title Nth Element of list/array Nth Largest Element of list/array Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants