What is the time complexity (excluding input) of this function?
int FindMax(int[] arr) { int max = arr[0]; foreach (var x in arr) if (x > max) max = x; return max; }
arr = [5, 2, 8, 1, 9]