|
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
|
to: