File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ */
4+ /**
5+ * @author M.NAVEEN
6+ * RANDOM CODER'S
7+ * Tech/Project Lead Android Club
8+ */
9+ package Graphs ;
Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ else if((rear ==-1)&&(front==-1))
2828
2929 System .out .println (+ele +":the element is pushed::" );
3030 }
31+
3132 else {
33+ System .out .println ("ENTER THE ELEMENT TO PUSH::" );
3234 int qele =nav .nextInt ();
3335 rear =rear +1 ;
3436 que [rear ]=qele ;
@@ -48,8 +50,8 @@ public static void pop()
4850 // }
4951
5052 if (rear ==-1 && front ==-1 )
51- System .out .println ("::underFLOW::" );
52- else if (rear ==front )
53+ System .out .println ("::underFLOW::" );
54+ if (rear ==front )
5355 {
5456 int x =que [front ];
5557 rear =rear -1 ;
@@ -72,7 +74,7 @@ public static void display()
7274 for (int i =front ;i <=rear ;++i )
7375 {
7476 System .out .println ("elements in queue" );
75- System .out .print (que [i ]);
77+ System .out .print (que [i ]+ " \n " );
7678
7779 }
7880
You can’t perform that action at this time.
0 commit comments