Is there some law that says Redditors aren't allowed to know jack shit about anything they talk about?Jeez. It's O(n)!Way worse, since n would be linear time based on the size of the input data. The runtime is literally x, wheremaxVal(int[] a) < x < maxVal(int[] a) + O(n)
which is something way more terrifying than even O(n!).