Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 19th, 2018 71 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. public static void splice(QueueInterface firstQueue, QueueInterface secondQueue) {
  2.     QueueInterface store = new ArrayQueue();
  3.     while(!secondQueue.isEmpty()) {
  4.         firstQueue.enqueue(secondQueue.getFront());
  5.         store.enqueue(secondQueue.dequeue());
  6.     }
  7.     while(!store.isEmpty()) {
  8.         secondQueue.enqueue(store.dequeue());
  9.     }
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top