Time Complexity In Sorted Edges