Updated alg sort memory : added comments