Re: Mergesort problem

2016-12-22 Thread Andrea D'Amore
I know a code review wasn't the main goal of you message but I feel it's worth mentioning two tips: On 22 December 2016 at 01:55, Deborah Swanson wrote: > ls = [] > with open('E:\\Coding projects\\Pycharm\\Moving\\New Listings.csv', > 'r') as infile: > raw = csv.reader(infile) >

RE: Mergesort problem

2016-12-21 Thread Deborah Swanson
> On Thu, Dec 22, 2016 at 11:55 AM, Deborah Swanson > wrote: > > The problem is that while mergeSort puts the list ls in > perfect order, > > which I can see by looking at result on merge's final return to > > mergeSort, and at the left and the right once back in > mergeSort. Both > > the le

Re: Mergesort problem

2016-12-21 Thread Chris Angelico
On Thu, Dec 22, 2016 at 11:55 AM, Deborah Swanson wrote: > The problem is that while mergeSort puts the list ls in perfect order, > which I can see by looking at result on merge's final return to > mergeSort, and at the left and the right once back in mergeSort. Both > the left half and the right

Re: MergeSort

2006-08-10 Thread Steven D'Aprano
On Wed, 09 Aug 2006 12:50:11 -0700, ben81 wrote: > Hi, > > the following code is adopted PseudoCode from Introduction to > Algorithms (Cormen et al). I'm assuming you are doing this as a learning exercise, because -- trust me on this -- nothing you write in pure Python code will come within coo