- Union-Find Algorithm
- implemented using Linked List
- Both time and space complexity being O(n)
- Try multi-channel-contacts.ipynb in Google Colab!
- Operation done in less than a minute in Google Colab
- Try multi-channel-contacts_union-find_simplified_version.ipynb in Google Colab
- More succinct code, but slightly slower than the other version
- My Blog Post in Mandarin(中文部落格講解)
(All data shown below are synthesized, instead of real competition data)