Skip to content

Commit 107932f

Browse files
initial commit
1 parent de14762 commit 107932f

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
*
3+
*/
4+
/**
5+
* @author M.NAVEEN
6+
* RANDOM CODER'S
7+
* Tech/Project Lead Android Club
8+
*/
9+
package Graphs;

NAVEEN/src/que.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)