Number Of Distinct Islands Problem