Example 1
maxValueAndIndex()Input
nums = [39, 3, 14, 17, -2, 51, 2, -1, -29, 17, -28, -13, 35, 7, -40, 77, -25, 54, 36, 31, 80, -13, -28, 10, 52, 67, 10, 49, -38, -39, 84, 13, -5, 40, -9, 42, -21, 54, 30, 71, 86, -31]Output
[86, 40]Why
`maxValueAndIndex` returns `[86, 40]` for this input.