Assume a queue containing only integer values. Write an algorithm(pseudo code) to replace the even numbers by -1 and store it in the same queue. (Only queue operations are allowed. Sample queue input:...


Assume a queue containing only integer values. Write an algorithm(pseudo code) to replace the even numbers by -1 and store it in the same queue. (Only queue operations are allowed.


Sample queue input: (bottom) 2,4,9,7,8,6,4


Expected queue output:-1,-1,9,7,-1,-1,-1



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here