Skip to content

Commit 87db7cf

Browse files
committed
fixed importing issue
1 parent 2d8171b commit 87db7cf

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

data_structures/disjoint_sets/disjoint_sets.rb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
require "./data_structures/disjoint_sets/node.rb"
1+
class Node
2+
attr_accessor :data, :parent, :rank
3+
def initialize(data)
4+
@data = data
5+
@parent = self
6+
@rank = 0
7+
end
8+
def parent
9+
@parent
10+
end
11+
def parent=(parent)
12+
@parent = parent;
13+
end
14+
def rank
15+
@rank
16+
end
17+
def rank=(rank)
18+
@rank = rank
19+
end
20+
end
221

322
class DisjointSets
423
def make_set(d)

data_structures/disjoint_sets/node.rb

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)