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: Assume the singly linked list, L s < > implementation from lecture. Assume you have a itT, correct implementation of f n _ fand M l i l O . Using these, write the function idi utpef p i t m l i l sthat takes an integer n and prints a space­separated list of all elements of rn_utpe , L s < n >n m that are multiples of n For example, if n = 4 and n m , 5 , itit us . , us={4 ,8 1 , 1 , then p i t m l i l s outputs: 0 2} rn_utpe 481 2 Note: We will not penalize you for incorrect whitespace or newlines but make sure your output is still readable and follows the requirements. The relevant function prototypes for the i t T Ls<> member functions are below. tmlt tpnm > epae<yeaeT casLs<>{ ls itT /.. /. casIeao ls trtr{ /.. /. } ; / euna trtrpitn otefrtnd /rtr nIeao onigt h is oe Ieao ei( os; trtrbgn)cnt / euna trtrpitn o"atteed /rtr nIeao onigt ps h n" Ieao n( os; trtred)cnt } ; Restrictions: ● Your implementation MUST USE ITERATORS ● The only L s ember functions you should call are b g n ) and e d ) itm ei( n( ● Do not call r m v F o t r m v B c , i s r F o t or i s r B c eoern, eoeak netrn, netak ● Do not copy the list EECS 280 Fall 2013 15...
View Full Document

Ask a homework question - tutors are online