Idea I think that should be handled at the end 

Forum: Com Sci 221, U Chicago, Autumn 2001, Old Classwork
Re: News Assignment #4 due Monday, 22 October (Mike O'Donnell)
Re: Question Extra If (Mamun Tanveer)
Date: 2001, Oct 22
From: Kristina Matesa kmatesa

My understanding was that that case should be taken care of in the invariant. Basically, we are only searching for the place where T (or whatever value you are looking for) should be, say index B. It is B that you are looking for, and once you have B, you compare the value of the Array[B] to your T value, and then deal with it accordingly. I think the actual function for finding B is the main point of the project.

Once you have B, you compare the value of what B is the index of, and from there you can decide if T should be placed in position 0.

Hope this helps and didn't make things more confusing,

Kristina


Messages

to: "I think that should be handled at the end"