add more sort impl and unionfind