Skip to main content

Arg Max

The arg max (argument of the maximum) operation finds the index of the maximum value in a sequence of numbers. For example, in the sequence [3, 1, 4, 1, 5], the arg max would return 4 because the maximum value (5) is at index 4.

src/arg_max.py
loading...

Run and test the arg_max program

1. Open "Nada by Example"

Open in Gitpod

2. Run the program with inputs from the test file

nada run arg_max_test_1

3. Test the program with inputs from the test file against the expected_outputs from the test file

nada test arg_max_test_1