Data-Structures-and-Algorithms-in-Java-2nd-Edition-by-Robert-Lafore icon indicating copy to clipboard operation
Data-Structures-and-Algorithms-in-Java-2nd-Edition-by-Robert-Lafore copied to clipboard

Chapter 04: CircularQueue.java

Open Abhinandan1414 opened this issue 4 years ago • 7 comments

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

Abhinandan1414 avatar May 07 '20 22:05 Abhinandan1414

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

srsandy avatar Jun 26 '20 22:06 srsandy

Hi Sandy, I am attaching file.

Best Regards,Abhinandan H. Patil, +919886406214https://www.AbhinandanHPatil.info

On Saturday, 27 June 2020, 3:33:28 am GMT+5:30, Sandeep「 Flame 」 <[email protected]> wrote:  

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Abhinandan1414 avatar Jun 26 '20 23:06 Abhinandan1414

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

srsandy avatar Jun 28 '20 13:06 srsandy

My expectation was that you take it and commit to the code base, So take it, get it reviewed and commit to the code base.

Best Regards,Abhinandan H. Patil, +919886406214https://www.AbhinandanHPatil.info

On Sunday, 28 June 2020, 6:54:32 pm GMT+5:30, Sandeep「 Flame 」 <[email protected]> wrote:  

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Abhinandan1414 avatar Jun 30 '20 06:06 Abhinandan1414

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

pallavijadhav31 avatar Sep 29 '20 06:09 pallavijadhav31

I can send code if you want

Sent from Yahoo Mail on Android

On Tue, Sep 29, 2020 at 12:11 PM, Pallavi Jadhav[email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Abhinandan1414 avatar Sep 29 '20 06:09 Abhinandan1414

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

srsandy avatar Sep 29 '20 10:09 srsandy