Section6problems 3

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: ./. ,/ that rearranges Write a method split the elements of a list of int.egers val-ues appear before aII of the nonneoar'i rrpq t.hat al-l- of the negative you have a variable if list called that stores example, t.he following sequence of values: [8, then the Iist. 1, -4, l.9, 0, 43, -8, -1, 2] so tror calL: split O; the negatives first. One possible the list to put shoul-d rearrange would be as follows: arrangement -8, -7, 1, 19, l-4, 8, O, 43, 2l So thj-s rearrange matters onJ-y that It ic nnlrr ^ne possible this way: the values [-'7, -8, -4, 2, the negatives appear bef ore the nonn€gatives. soluti-...
View Full Document

Ask a homework question - tutors are online