Implemented set-union data structure in pseudocode