1. Components: Start at n. Decrement on successful union.
2. Max size: Start at 1.
After union, update to max of current and new component size. After each edge, output components maxSize. Time: O(m⋅α(n)) for m edges. This is the best you can do for this problem type. Use union by size (not rank) so you always know each component's exact size from the root's stored value.