Skip to content

Commit

Permalink
add linear scan example to nada-by-example
Browse files Browse the repository at this point in the history
  • Loading branch information
oceans404 committed Aug 9, 2024
1 parent 45b7be5 commit ad5d74f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/nada-by-example/linear-scan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Linear Scan

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import TestProgram from '@site/src/components/TestProgram/index';

The linear scan example scans a list of secret values from multiple parties, checking for the existence of specific values. The example uses a reusable helper function for the logic for determining whether a given value is present or isn't present in the list.

<Tabs>

<TabItem value="program" label="Nada program" default>
```python reference showGithubLink
https://github.com/NillionNetwork/nada-by-example/blob/main/src/list_scan_linear.py
```
</TabItem>

<TabItem value="test" label="Test file">
```yaml reference showGithubLink
https://github.com/NillionNetwork/nada-by-example/blob/main/tests/list_scan_linear_test.yaml
```
</TabItem>
</Tabs>

<TestProgram programName="list_scan_linear"/>
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ const sidebars = {
'nada-by-example/for-loop',
'nada-by-example/reduce',
'nada-by-example/random-number',
'nada-by-example/linear-scan',
'nada-by-example/voting',
'nada-by-example/r-p-s',
{
Expand Down

0 comments on commit ad5d74f

Please sign in to comment.