Code refact : implements non recursion method for merge sort