# Disjoint sets

**URL:** <https://discourse.julialang.org/t/disjoint-sets/44419>\
**Category:** General Usage\
**Created:** [August 6, 2020, 1:45pm UTC](https://discourse.julialang.org/t/disjoint-sets/44419 "2020-08-06T13:45:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://discourse.julialang.org/u/omar)\
**Post date:** [August 6, 2020, 1:45pm UTC](https://discourse.julialang.org/t/disjoint-sets/44419/1 "2020-08-06T13:45:02Z")

</div>

I tried using [Disjoint sets](https://juliacollections.github.io/DataStructures.jl/stable/disjoint_sets/#Disjoint-Sets-1) but encountered an error “ERROR: LoadError: UndefVarError: IntDisjointSets not defined”. I’m using julia version 1.4.1 and my code was simply just:

U = IntDisjointSets(10)  
println(U)

---

<div class="post-metadata">

**Author:** ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Post date:** [August 6, 2020, 2:00pm UTC](https://discourse.julialang.org/t/disjoint-sets/44419/2 "2020-08-06T14:00:43Z")

</div>

Maybe a stupid question: did you load the DataStructures package before?

```julia
using DataStructures
U = IntDisjointSets(10)
println(U)

```

works for me without error.

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://discourse.julialang.org/u/omar)\
**Post date:** [August 6, 2020, 4:59pm UTC](https://discourse.julialang.org/t/disjoint-sets/44419/3 "2020-08-06T16:59:58Z")

</div>

Thanks a bunch! Didn’t know a package had to be loaded 😅
