0
Queue Initialization
Why is item not recognized? https://code.sololearn.com/c371h9jv0KJv/?ref=app
2 Respostas
+ 1
c.add(n) is not inside the scope of the input loop so it never adds anything.
item = c.next() is inside of the if c.is_empty(): condition check so no item is ever dequeued.
0
Odyel It worked!!!!!! Gr8