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
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here