Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INITIALIZE-F (k)
- F=ARRAY[1,k] of INT
- for i = 1 to k
- F[i]=NIL
- i=0
- MAKE-SET(x)
- Si=LINKED-LIST of INT
- y=NewNode(x)
- Si.head=y
- Si.tail = y
- y.prev=NIL
- y.next = NIL
- F[i]=Si.head
- i=i+1
- DISJOINT-UNION(Si,Sj)
- A.tail.next=B.head
- B.head.prev=A.tail
- B.head=NIL
- B.tail = NIL
- REPORT(Si)
- x=A.head
- while x!=NIL
- PRINT x.data
- x=x.next
Add Comment
Please, Sign In to add comment