Section7Problems 5 - 11. and as a parameter takes a queue...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 11. and as a parameter takes a queue of integers that a method reorder Write the (nondecreasing) order assuming that sorted into puts the integers that a that supPose For example' va1ue. by absofute sorted queue is already sequence of values: q stores the following caIIed variable front 1I,2, -2, 4, -5, 8, -8, in 12, sorted -15, order 231 back if you ignore the sign of the the values Notj_ce that The following numbers. reorder should (q) ; the -8, appear call: reorder [-15, values -5, so that -2, L,2, the 4,8, in queue stores this sequence of values: front that Notice sigri of the you are to 12,231 sorted back taking into account the the vafues numbers one stack now appear order use as auxiliary storage to solve this problem. ...
View Full Document

This note was uploaded on 11/03/2009 for the course CSE 143 taught by Professor Sr during the Spring '08 term at University of Washington.

Ask a homework question - tutors are online