Added union find algo based on Sedgewick book Vol 1