Verified learner corpus

Algorithms written in NAUX—not delegated to host builtins.

Eight representative programs from the 30-exercise S1 corpus. Every example has deterministic input and expected output.

Corpus
30
Shown
8
Domains
7
Basics

Sum an array

Counted input, a bounded loop, and scalar accumulation.

solution.nxNAUX Learn
~ rite
    $n = read_int()
    $sum = 0
    ~ loop $n
        $sum = $sum + read_int()
    ~ end
    !say $sum
~ end
Input
5
3 -2 7 10 4
Output
22
naux run solution.nx < input.txt

Complete S1 inventory

30 deterministic exercises across six tracks

Foundations 8

  • Sum array
  • Maximum
  • Count even
  • Reverse
  • Factorial
  • Fibonacci
  • Euclidean GCD
  • Prime check

Search and prefix 4

  • Linear search
  • Binary search
  • First occurrence
  • Prefix range sum

Sorting 4

  • Bubble
  • Selection
  • Insertion
  • Counting

Graphs 6

  • BFS
  • DFS
  • Shortest unweighted
  • Dijkstra
  • Connected components
  • Topological sort

Greedy 3

  • Coin change
  • Interval scheduling
  • Maximum items under budget

Dynamic programming 5

  • 0/1 knapsack
  • Minimum coin change
  • LIS
  • Grid paths
  • Subset sum

The corpus also covers DFS, Dijkstra, topological sort, interval scheduling, prefix sums, counting sort, subset sum, and more.

Browse the exercise guide