I\'m pretty new to this stuff and I need your help.
I should build an efficient simple algorithm which returns the maximum value in an array with size of n which contain
If there is no prior information about the array (e.g. it's sorted), then there is no worst case or best case, and You have to scan all the elements to find out the Max, and it takes O(n) times.
Also, knowing the probability distribution of getting max value for each cell is useless in general (unless it reduces your search space. e.g., If you know that only constant number of cells have non-zero probability of getting the max value, then you just need to search those cells and it takes constant time). Thus, in general
Best-case running time = Worst-case running time = average running time = O(n)