Friday, July 22, 2016
C++ Solution to UVA 10583 - Ubiquitous Religions Union by Rank and Path Compression
July 22, 2016
algorithm explanation
,
algorithm to cpp implementation
,
c++
,
commented code
,
disjoint set count
,
made easy
,
path compression
,
Ubiquitous Religions solution
,
union by rank
,
uva 10583
Problem Link:
https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1524These are my old codes I kept for visual explanations but I lost all the data. Since these are old codes I can not remember if I made any breaking changes to the code later. For the algorithm please see Introduction to Algorithms book.
Problem Explanation & Visalization:
TODOInput & Output Explanation:
TODOInput & Output:
Input:10 9 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 10 4 2 3 4 5 4 8 5 8 0 0
Output:Case 1: 1 Case 2: 7
More input and output in udebug:
https://www.udebug.com/UVa/10583Code:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment