What is agglomerative clustering complexity?

Updated May 15, 2026

Short answer

Agglomerative clustering has O(n^2 log n) or worse complexity depending on implementation.

Deep explanation

It computes pairwise distances and merges clusters iteratively, making it expensive for large datasets.

Real-world example

Bioinformatics gene clustering with small datasets.

Common mistakes

  • Using it for very large datasets.

Follow-up questions

  • Is hierarchical clustering scalable?

More Clustering interview questions

View all →