Sub-Array with a unique element
$\lceil \lg n \rceil$.

For example, for $n=10$, try ABACABADAB.  See if you can work out the pattern.

(I'll leave it at that, as this is a nice exercise problem and I'll let you have the joy of solving it on your own.)