Finding the Nth Element in an Array #40
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Nada Example
Description
This example introduces a program that helps users find the Nth largest element in a list or array of
SecretIntegers
. The program solves a common problem of selecting a specific element by size from a given dataset, while maintaining security by handling secret integers. The example is further extended to show how Nada can handle multi-dimensional arrays, adding flexibility and depth for more complex use cases.Changes:
nth_element_of_an_array.py
to thesrc/
directory.nth_element_of_an_array_test.yaml
to thetests/
directory for testing various edge cases and array dimensions.nada-project.toml
to include this new program.Use Case
The target use cases for this example include:
SecretIntegers
to ensure privacy during computations.Related Issues
This pull request addresses issue #17, which requested a new example for selecting the Nth element from an array.Optional: add your information for a Nada by Example Contributor POAP
Your Twitter:
Your Ethereum address: