when we use find operation we have to take its complexity as O(1) or O(logn) in general?
Complexity of find operation in disjoint set data structure
that is we should consider the amortised time or worst case time to calculate the complexity in kruskal algo?
In Union by rank algo, the complexity of find function is O(logn).
Refer this https://www.geeksforgeeks.org/union-find-algorithm-set-2-union-by-rank/ for more details.
i am asking when we implement find operation using union by rank+path compression technique as in this case worst time is O(logn) but amortized time is O(1) .so while calculating the complexity in algorithms in which we use find operation which time to consider-- worst case time or amortised time?