Provide an efficient implementation (detailed pseudo-code) for the greedy approach based on selecting the activity with minimum number of overlapping activities and discuss its complexity.
Note: the number of overlapping activities for each activity should be explicitly calculated.