Given the head of a singly linked list, return the maximum value among all node values.
Input: Head of a singly linked list (at least one node).
Output: Integer — maximum node value.
Input: [3,1,4,1,5,9,2,6]
Output: 9
Explanation: Traverse all; max is 9.Input: [-5,-1,-3]
Output: -1
Explanation: All negatives; max is -1.Input: [7]
Output: 7
Explanation: Single node; max is 7.1<=nodes<=10^4-10^9<=Node.val<=10^9