Updated Gradle wrapper version.
Added union find code.