Added documentation and implementation for different sorting techniques.