Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

FinalExam Review Spring2006: Explain the Insert

Questions? Answers? Comments? Comments on Questions or Answers?
(Back to Final Exam Review Spring2006)



More guessing!

A. At position A, the event is only inserted if it has smaller time than the comparison index event. Otherwise, it is inserted at position B

B. I don't think so. Maybe if two events have the same time and position A's search doesn't catch that? I don't know.

Someone please post! I need to know if I'm even close to right....

Flesh out answer A. Is there one comparison index event? Mark Guzdial

Well comparison becomes equal to whatever event is at i for that time through. So it basically goes through the whole list... but doing that same thing as stated in A. The way I understand it...

Yup. Mark Guzdial

On B, I don't think it would have that problem if the times were the same since it is checking to see if the time is less than.



Link to this Page