Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя 013

Автор 013, 9 лет назад, По-английски

Help plz. Why is this submission getting wrong answer on test 19?

Thanks in advance :)

problem link

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Consider the following test:

5
3
3
3
3
0 

Your Output:

pushStack
pushQueue
pushFront
3 popStack popQueue popFront

Notice that you are not printing anything for the 4th query because temp is 3
You should make sure to mark a value visited when pushing it into one of the containers
AC Code 12958573