Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 04: CircularQueue.java #60

Open
Abhinandan1414 opened this issue May 7, 2020 · 7 comments
Open

Chapter 04: CircularQueue.java #60

Abhinandan1414 opened this issue May 7, 2020 · 7 comments
Labels
good first issue Good for newcomers hacktober hacktoberfest help wanted Extra attention is needed question Further information is requested up-for-grabs

Comments

@Abhinandan1414
Copy link

The mentioned file needs to be re-written. There is no concept of overflow in Circular Queue as it wraps up. What I mean is:
Test Driver Code:
public static void main(String[] agrs) {
CircularQueue q = new CircularQueue(5);
q.insert(10);
q.insert(20);
q.insert(30);
q.insert(40);
q.display();
q.insert(50);
q.display();
q.insert(60);
q.insert(70);
q.display();
q.delete();
q.display();

            q.delete();
            q.display();

            q.delete();
            q.display();

            q.delete();
            q.delete();
            q.display();

            q.insert(60);
            q.insert(70);
            q.insert(80);
            q.display();
            q.delete();
            q.display();

    }

Should produce output:
$ java CircularQueue
10 20 30 40
10 20 30 40 50 //First five elements
60 70 30 40 50 //Enqueue of 60 and 70
70 30 40 50 //Dequeue
30 40 50 //Dequeue
40 50
//Two Dequeue
60 70 80 //Enqueue of 60 70 80
70 80 //Dequeue

@srsandy
Copy link
Owner

srsandy commented Jun 26, 2020

@Abhinandan1414 Would you like to add a PR for this?

@Abhinandan1414
Copy link
Author

Abhinandan1414 commented Jun 26, 2020 via email

@srsandy
Copy link
Owner

srsandy commented Jun 28, 2020

@Abhinandan1414 you cannot attach file and send it to the codebase using mail

@Abhinandan1414
Copy link
Author

Abhinandan1414 commented Jun 30, 2020 via email

@pallavijadhav31
Copy link

hello, I want to contribute in this issue but don't know how .....
anybody please help me

@Abhinandan1414
Copy link
Author

Abhinandan1414 commented Sep 29, 2020 via email

@srsandy
Copy link
Owner

srsandy commented Sep 29, 2020

@pallavijadhav31 Just a pull request with the changes required changes. 👍

@srsandy srsandy added good first issue Good for newcomers hacktober hacktoberfest help wanted Extra attention is needed question Further information is requested up-for-grabs labels Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktober hacktoberfest help wanted Extra attention is needed question Further information is requested up-for-grabs
Projects
None yet
Development

No branches or pull requests

3 participants