Skip to content

Added QueueUsingTwoStacks.java class in Other folder #229

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

Merged
merged 2 commits into from
Oct 20, 2017

Conversation

sahilb2
Copy link
Contributor

@sahilb2 sahilb2 commented Oct 19, 2017

QueueUsingTwoStacks.java implements the Queue data structure using two Stacks. Implementation and runtime explained in the comments.

Copy link
Contributor

@varunu28 varunu28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add a main method
  • Keep all the current functionality of Queue class in a separate class (You can call it QueueWithTwoStacks) and just keep the main method in QueueUsingTwoStacks in which you create an object of the QueueWithTwoStacks and test your logic

@sahilb2
Copy link
Contributor Author

sahilb2 commented Oct 20, 2017

Added a main method with test cases for Queue

@varunu28 varunu28 merged commit 598783d into TheAlgorithms:master Oct 20, 2017
@varunu28
Copy link
Contributor

@sahilb2 Thanks for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants