Implement common sorting algorithms and perform the respective analysis.