O(N**2) and O(N*log(N)) sorting algorithms