Artificial intelligent assistant

Expected length of the "greedy" increasing sub-sequence? Given a sequence of random unique integers of length $n$, if I select every element that is the largest so far how how many elements should I expect to select? This seems superficially similar to this problem but based on some trivial counter examples ($9,8,7,6,5,...$) has different results.

From symmetry considerations, it's easy to see that the $k$th element has exactly a $1/k$ chance of being the largest among the first $k$ terms. By linearity of expectation, the expected number of "record-breakers" in a random ordering is just $\sum_{k=1}^n \frac1k$. This is the $n$th harmonic number, which is well-approximated by $\ln n + \gamma$, where $\gamma = 0.5772\ldots$ is Euler's constant.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 24426e5985e3b64019a06561c1fe77d3