Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions QueueLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// A linked list (LL) node to store a queue entry
class QNode
{
int key;
int key = 0;
QNode next;

// constructor to create a new linked list node
Expand Down Expand Up @@ -78,4 +78,4 @@ public static void main(String[] args)

System.out.println("Dequeued item is "+ q.dequeue().key);
}
}
}
2 changes: 1 addition & 1 deletion StackDemo.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
public class StackDemo {
private static final int capacity = 3;
int arr[] = new int[capacity];
int top = -1;
int top = 0;

public void push(int pushedElement) {
if (top < capacity - 1) {
Expand Down