Posts by braindf • 136 points
1 post
-
2
votes1
answer441
viewsA: Java stack intercalating values
Use a control variable to determine which stack you should take the element from. Something like: int pilha = 1; if (pilha == 1) { p3.insere(p1.remove()); pilha = 2; } else { p3.insere(p2.remove());…