In: Computer Science
You scan through a list of n elements, keeping track of the max. Every time you encounter a new max, you update some variable. How many times do you expect to make such an update?
Define the answer as a random variable, break it into indicator random variables, use linearity of expectation, evaluate each IRV, and finally express the answer as best you can using O, Ω, or Θ.